From 25f459316378f3dd91de7900bddaf50eb2760af4 Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Thu, 8 Dec 2005 22:58:14 +0000 Subject: [PATCH] fix for avatarMoving when turning --- direct/src/controls/ShipPilot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/controls/ShipPilot.py b/direct/src/controls/ShipPilot.py index 9767a70643..f83425eb53 100755 --- a/direct/src/controls/ShipPilot.py +++ b/direct/src/controls/ShipPilot.py @@ -674,6 +674,8 @@ class ShipPilot(PhysicsWalker.PhysicsWalker): else: mult = .8 self.currentTurning *= mult + if self.currentTurning < 0.001 and self.currentTurning > -0.001: + self.currentTurning = 0.0 self.__rotationSpeed = self.currentTurning @@ -794,7 +796,7 @@ class ShipPilot(PhysicsWalker.PhysicsWalker): assert self.avatarNodePath.getPos().almostEqual(physObject.getPosition(), 0.0001) # Check to see if we're moving at all: - if 0 or self.__speed or self.__slideSpeed or self.__rotationSpeed or moveToGround!=Vec3.zero(): + if self.__speed or self.__slideSpeed or self.__rotationSpeed or moveToGround!=Vec3.zero(): distance = dt * self.__speed slideDistance = dt * self.__slideSpeed rotation = dt * self.__rotationSpeed