mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
Adding new function to set height of collision ray.
This commit is contained in:
parent
544b100908
commit
55455a48c9
@ -693,3 +693,12 @@ class GravityWalker(DirectObject.DirectObject):
|
||||
"""for debugging"""
|
||||
return self.notify.debug(
|
||||
str(id(self))+' '+message)
|
||||
|
||||
# There are sometimes issues if the collision ray height is
|
||||
# so tall that it collides with multiple levels of floors.
|
||||
def setCollisionRayHeight(self, height):
|
||||
oldNode = self.avatarNodePath.getNode(0)
|
||||
cRayNode = oldNode.getChild(2)
|
||||
cRayNode.removeSolid(0)
|
||||
cRay = CollisionRay(0.0, 0.0, height, 0.0, 0.0, -1.0)
|
||||
cRayNode.addSolid(cRay)
|
Loading…
x
Reference in New Issue
Block a user