change on flight dynamics

master
Alexsandro Percy 2022-03-22 12:59:41 -03:00
parent c596d52fed
commit 956c0fe804
3 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
ju52={}
ju52.gravity = tonumber(minetest.settings:get("movement_gravity")) or 9.8
ju52.wing_angle_of_attack = 1
ju52.min_speed = 9
ju52.wing_angle_of_attack = 0
ju52.min_speed = 12
ju52.max_engine_acc = 9 --5
ju52.lift = 10 --12
ju52.trunk_slots = 50

View File

@ -598,9 +598,9 @@ function ju52.flightstep(self)
-- new yaw
if math.abs(self._rudder_angle)>1 then
local turn_rate = math.rad(12)
local turn_rate = math.rad(10)
local turn = math.rad(self._rudder_angle) * turn_rate
local yaw_turn = self.dtime * (turn * ju52.sign(longit_speed) * math.abs(longit_speed/2))
local yaw_turn = self.dtime * (turn * ju52.sign(longit_speed) * math.abs(longit_speed/3))
newyaw = yaw + yaw_turn
end
@ -613,7 +613,7 @@ function ju52.flightstep(self)
local snormal = {x=sdir.z,y=0,z=-sdir.x} -- rightside, dot is negative
local prsr = ju52.dot(snormal,nhdir)
local rollfactor = -90
local roll_rate = math.rad(12)
local roll_rate = math.rad(10)
newroll = (prsr*math.rad(rollfactor)) * (later_speed * roll_rate) * ju52.sign(longit_speed)
--minetest.chat_send_all('newroll: '.. newroll)
else

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 KiB

After

Width:  |  Height:  |  Size: 604 KiB