Browse Source

control joints now go on the part bundles

Zachary Pavlov 19 years ago
parent
commit
2f648c1e56
1 changed files with 6 additions and 3 deletions
  1. 6 3
      direct/src/actor/Actor.py

+ 6 - 3
direct/src/actor/Actor.py

@@ -1026,12 +1026,15 @@ class Actor(DirectObject, NodePath):
         if joint == None:
             Actor.notify.warning("no joint named %s!" % (jointName))
             return None
-
+        finalNode=node
         if node == None:
-            node = self.attachNewNode(jointName)
+            node = NodePath(ModelNode(jointName))
+            node.node().setPreserveTransform(ModelNode.PTLocal)
+            node.reparentTo(partDef.partBundleNP)
             if joint.getType().isDerivedFrom(MovingPartMatrix.getClassType()):
                 node.setMat(joint.getInitialValue())
-
+        elif (lodName!="lodRoot"):
+            node.instanceTo(partDef.partBundleNP)
         # Store a dictionary of jointName: node to list the controls
         # requested for joints.  The controls will actually be applied
         # later, when we load up the animations in bindAnim().