diff --git a/direct/src/showbase/ControlManager.py b/direct/src/showbase/ControlManager.py index 570d93a0cb..9266849c2b 100755 --- a/direct/src/showbase/ControlManager.py +++ b/direct/src/showbase/ControlManager.py @@ -27,9 +27,7 @@ class ControlManager: self.enableJumpCounter = 1 - self.swimControls=GravityWalker.GravityWalker( - gravity = -32.1740 * 2.0) - #self.swimControls=NonPhysicsWalker.NonPhysicsWalker() + self.swimControls=NonPhysicsWalker.NonPhysicsWalker() self.ghostControls=GhostWalker.GhostWalker() if __debug__: self.devControls=DevWalker.DevWalker() diff --git a/direct/src/showbase/GravityWalker.py b/direct/src/showbase/GravityWalker.py index 64ff742286..e65ab5c5f6 100755 --- a/direct/src/showbase/GravityWalker.py +++ b/direct/src/showbase/GravityWalker.py @@ -158,7 +158,7 @@ class GravityWalker(DirectObject.DirectObject): """ # This is a sphere on the ground to detect barrier collisions self.avatarRadius = avatarRadius - self.cSphere = CollisionSphere(0.0, 0.0, avatarRadius+0.5, avatarRadius) + self.cSphere = CollisionSphere(0.0, 0.0, avatarRadius, avatarRadius) cSphereNode = CollisionNode('GW.cWallSphereNode') cSphereNode.addSolid(self.cSphere) cSphereNodePath = self.avatarNodePath.attachNewNode(cSphereNode) diff --git a/direct/src/showbase/NonPhysicsWalker.py b/direct/src/showbase/NonPhysicsWalker.py index 3ceefe2d7f..ac0f6d43c8 100755 --- a/direct/src/showbase/NonPhysicsWalker.py +++ b/direct/src/showbase/NonPhysicsWalker.py @@ -154,7 +154,7 @@ class NonPhysicsWalker(DirectObject.DirectObject): reverse = inputState.isSet("reverse") turnLeft = inputState.isSet("turnLeft") turnRight = inputState.isSet("turnRight") - slide = inputState.isSet(self.slideName) + slide = inputState.isSet(self.slideName) or 0 #jump = inputState.isSet("jump") # Determine what the speeds are based on the buttons: self.speed=(forward and self.avatarControlForwardSpeed or @@ -196,6 +196,10 @@ class NonPhysicsWalker(DirectObject.DirectObject): self.vel.set(0.0, 0.0, 0.0) return Task.cont + def doDeltaPos(self): + assert(self.debugPrint("doDeltaPos()")) + pass + def reset(self): assert(self.debugPrint("reset()")) pass