From 55455a48c9d15a0719156793286240331d5ae2e4 Mon Sep 17 00:00:00 2001 From: Matt Newcomb Date: Mon, 20 Sep 2010 23:50:32 +0000 Subject: [PATCH] Adding new function to set height of collision ray. --- direct/src/controls/GravityWalker.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/direct/src/controls/GravityWalker.py b/direct/src/controls/GravityWalker.py index 90b244155e..5552168860 100755 --- a/direct/src/controls/GravityWalker.py +++ b/direct/src/controls/GravityWalker.py @@ -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) \ No newline at end of file