ソースを参照

Added code to stash hull collision walls on a ship if it has any (only for the local player's ship)

Justin Butler 20 年 前
コミット
3ae7aedb67
1 ファイル変更6 行追加0 行削除
  1. 6 0
      direct/src/controls/ShipPilot.py

+ 6 - 0
direct/src/controls/ShipPilot.py

@@ -218,6 +218,12 @@ class ShipPilot(PhysicsWalker.PhysicsWalker):
 
             self.pusher.addCollider(self.cSternSphereNodePath, self.avatarNodePath)
 
+            # hide other things on my ship that these spheres might collide
+            # with and which I dont need anyways...
+            shipCollWall = self.avatarNodePath.hull.find("**/collision_hull")
+            if not shipCollWall.isEmpty():
+                shipCollWall.stash()
+            
     def takedownPhysics(self):
         assert(self.debugPrint("takedownPhysics()"))
         if hasattr(self, "phys"):