fix for avatarMoving when turning

This commit is contained in:
Dave Schuyler 2005-12-08 22:58:14 +00:00
parent 968ad486b8
commit 25f4593163

View File

@ -674,6 +674,8 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
else: else:
mult = .8 mult = .8
self.currentTurning *= mult self.currentTurning *= mult
if self.currentTurning < 0.001 and self.currentTurning > -0.001:
self.currentTurning = 0.0
self.__rotationSpeed = self.currentTurning self.__rotationSpeed = self.currentTurning
@ -794,7 +796,7 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
assert self.avatarNodePath.getPos().almostEqual(physObject.getPosition(), 0.0001) assert self.avatarNodePath.getPos().almostEqual(physObject.getPosition(), 0.0001)
# Check to see if we're moving at all: # 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 distance = dt * self.__speed
slideDistance = dt * self.__slideSpeed slideDistance = dt * self.__slideSpeed
rotation = dt * self.__rotationSpeed rotation = dt * self.__rotationSpeed