From 13ab99c29f9750b0c6e3d765f7af0b67d173225c Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Wed, 5 Oct 2005 03:42:54 +0000 Subject: [PATCH] stick to terrain --- direct/src/controls/GravityWalker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/direct/src/controls/GravityWalker.py b/direct/src/controls/GravityWalker.py index 4ef2f858c5..a22a02cbf0 100755 --- a/direct/src/controls/GravityWalker.py +++ b/direct/src/controls/GravityWalker.py @@ -518,7 +518,7 @@ class GravityWalker(DirectObject.DirectObject): self.vel=Vec3(Vec3.forward() * distance + Vec3.right() * slideDistance) if self.vel != Vec3.zero() or self.priorParent != Vec3.zero(): - if 1: + if 0: # rotMat is the rotation matrix corresponding to # our previous heading. rotMat=Mat3.rotateMatNormaxis(self.avatarNodePath.getH(), Vec3.up()) @@ -532,7 +532,7 @@ class GravityWalker(DirectObject.DirectObject): step=rotMat.xform(self.vel) + (self.priorParent * dt) self.avatarNodePath.setFluidPos(Point3( self.avatarNodePath.getPos()+step)) - if 0: + if 1: # rotMat is the rotation matrix corresponding to # our previous heading. rotMat=Mat3.rotateMatNormaxis(self.avatarNodePath.getH(), Vec3.up()) @@ -542,7 +542,7 @@ class GravityWalker(DirectObject.DirectObject): headsUp(rotMat2, forward, up) #rotMat2=Mat3.rotateMatNormaxis(0.0, ) step=rotMat2.xform(self.vel) + (self.priorParent * dt) - if 1: + if 0: onScreenDebug.add("a getH()", self.avatarNodePath.getH()) onScreenDebug.add("a forward", forward.pPrintValues()) onScreenDebug.add("a up", up.pPrintValues())