mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
improved climbing reactions
This commit is contained in:
parent
6964b39b04
commit
bd5a2b7c2c
2 changed files with 2 additions and 2 deletions
2
init.lua
2
init.lua
|
@ -333,7 +333,7 @@ end
|
|||
|
||||
function airutils.get_plane_pitch(velocity, longit_speed, min_speed, angle_of_attack)
|
||||
local v_speed_factor = 0
|
||||
if longit_speed > min_speed then v_speed_factor = (velocity.y * math.rad(2)) end --the pitch for climbing or descenting
|
||||
if longit_speed > 0 then v_speed_factor = (velocity.y * math.rad(2)) end --the pitch for climbing or descenting
|
||||
local min_rotation_speed = min_speed/2
|
||||
local pitch_by_longit_speed = 0
|
||||
if longit_speed > min_rotation_speed then --just start the rotation after the rotation speed
|
||||
|
|
|
@ -498,7 +498,7 @@ function airutils.logic(self)
|
|||
self._last_accell = new_accel
|
||||
self.object:move_to(curr_pos)
|
||||
--airutils.set_acceleration(self.object, new_accel)
|
||||
local limit = (self._max_speed/self.dtime) * 2
|
||||
local limit = (self._max_speed/self.dtime)
|
||||
local vel_to_add = vector.multiply(new_accel,self.dtime)
|
||||
if new_accel.y > limit then new_accel.y = limit end --it isn't a rocket :/
|
||||
vel_to_add.y = 0
|
||||
|
|
Loading…
Add table
Reference in a new issue