Plane: implemented tail friction force

This commit is contained in:
Erkki Seppälä 2014-10-19 02:45:49 +03:00
parent 30950bd9c0
commit 0b91e40954

View file

@ -234,6 +234,9 @@ Plane = Class{
local lift_x, lift_y = VectorLight.mul(wing_lift * math.pow(fwd_vel, 2.0) * lift_coeff, 0, -1) local lift_x, lift_y = VectorLight.mul(wing_lift * math.pow(fwd_vel, 2.0) * lift_coeff, 0, -1)
rel_force("lift", lift_x, lift_y, self.xsize * 0.8, 0) rel_force("lift", lift_x, lift_y, self.xsize * 0.8, 0)
local tail_frict = tail_frict_coeff * math.pow(tail_speed, 2.0) * sign(tail_speed)
rel_force("tf", 0, tail_frict, -self.xsize / 2, 0)
-- if self.turningCcw then -- if self.turningCcw then
-- dx, dy = VectorLight.rotate(self.angle, 0, 50000) -- dx, dy = VectorLight.rotate(self.angle, 0, 50000)
-- elseif self.turningCw then -- elseif self.turningCw then