mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
better handling of toon falling out of world
This commit is contained in:
parent
fd4965ce1d
commit
51d58744c9
@ -230,7 +230,9 @@ class PhysicsWalker(DirectObject.DirectObject):
|
|||||||
# hack fix for falling through the floor:
|
# hack fix for falling through the floor:
|
||||||
if contact==Vec3.zero() and self.avatarNodePath.getZ()<-50.0:
|
if contact==Vec3.zero() and self.avatarNodePath.getZ()<-50.0:
|
||||||
# reset:
|
# reset:
|
||||||
self.avatarNodePath.setPos(Vec3(0.0, 0.0, 20.0))
|
# DCR: don't reset X and Y; allow player to move
|
||||||
|
self.avatarNodePath.setZ(50.0)
|
||||||
|
self.resetPhys()
|
||||||
|
|
||||||
# Determine what the speeds are based on the buttons:
|
# Determine what the speeds are based on the buttons:
|
||||||
self.__speed=(self.__forwardButton and self.avatarControlForwardSpeed or
|
self.__speed=(self.__forwardButton and self.avatarControlForwardSpeed or
|
||||||
|
Loading…
x
Reference in New Issue
Block a user