mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
more fixed from abs
This commit is contained in:
parent
3496cc07d7
commit
22fe149890
2 changed files with 2 additions and 2 deletions
2
init.lua
2
init.lua
|
@ -291,7 +291,7 @@ function airutils.getLiftAccel(self, velocity, accel, longit_speed, roll, curr_p
|
|||
local cross = vector.cross(velocity,hdir)
|
||||
local lift_dir = vector.normalize(vector.cross(cross,hdir))
|
||||
|
||||
local lift_coefficient = (0.24*abs(daoa)*(1/(0.025*daoa+3))^4*math.sign(daoa))
|
||||
local lift_coefficient = (0.24*math.abs(daoa)*(1/(0.025*daoa+3))^4*math.sign(daoa))
|
||||
local lift_val = math.abs((lift*(vector.length(striped_velocity)^2)*lift_coefficient)*curr_percent_height)
|
||||
if lift_val < 1 then lift_val = 1 end -- hipotetical aerodinamic wing will have no "lift" for down
|
||||
--minetest.chat_send_all('lift: '.. lift_val)
|
||||
|
|
|
@ -83,7 +83,7 @@ function airutils.control(self, dtime, hull_direction, longit_speed, longit_drag
|
|||
engineacc = longit_speed * -1
|
||||
end
|
||||
end
|
||||
if abs(longit_speed) < 0.2 then
|
||||
if math.abs(longit_speed) < 0.2 then
|
||||
stop = true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue