improved climbing reactions

This commit is contained in:
Alexsandro Percy 2023-10-26 20:00:05 -03:00
parent 6964b39b04
commit bd5a2b7c2c
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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