check accell values before apply
parent
8af820a654
commit
7162a0fb35
|
@ -76,7 +76,10 @@ function pa28.physics(self)
|
|||
|
||||
if new_velocity then
|
||||
new_velocity = vector.add(new_velocity, vector.multiply(self._last_accell, self.dtime))
|
||||
|
||||
if new_velocity.x == nil then new_velocity.x = 0 end
|
||||
if new_velocity.y == nil then new_velocity.y = 0 end
|
||||
if new_velocity.z == nil then new_velocity.z = 0 end
|
||||
|
||||
--[[
|
||||
new_velocity correction
|
||||
under some circunstances the velocity exceeds the max value accepted by set_velocity and
|
||||
|
|
Loading…
Reference in New Issue