瀏覽代碼

no-op placeOnFloor to fix opening book while swimming bug

Joe Shochet 22 年之前
父節點
當前提交
90e07b77d5
共有 1 個文件被更改,包括 6 次插入2 次删除
  1. 6 2
      direct/src/showbase/NonPhysicsWalker.py

+ 6 - 2
direct/src/showbase/NonPhysicsWalker.py

@@ -140,8 +140,12 @@ class NonPhysicsWalker(DirectObject.DirectObject):
         For example, this is useful when switching away from the 
         current walker.
         """
-        self.oneTimeCollide()
-        self.avatarNodePath.setZ(self.avatarNodePath.getZ()-self.getAirborneHeight())
+        # With these on, getAirborneHeight is not returning the correct value so
+        # when we open our book while swimming we pop down underneath the ground
+        # self.oneTimeCollide()
+        # self.avatarNodePath.setZ(self.avatarNodePath.getZ()-self.getAirborneHeight())
+        # Since this is the non physics walker - wont they already be on the ground?
+        return
 
     def oneTimeCollide(self):
         """