Browse Source

actor: change parent of exposed joint to character

This prevents exposed joints from not being affected by a transform directly on the Character node.  See panda3d/panda3d#221 for more details.

Fixes #221
rdb 8 năm trước cách đây
mục cha
commit
c1679472cd
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      direct/src/actor/Actor.py

+ 2 - 2
direct/src/actor/Actor.py

@@ -1103,8 +1103,8 @@ class Actor(DirectObject, NodePath):
         # Get a handle to the joint.
         # Get a handle to the joint.
         joint = bundle.findChild(jointName)
         joint = bundle.findChild(jointName)
 
 
-        if node == None:
-            node = self.attachNewNode(jointName)
+        if node is None:
+            node = partDef.partBundleNP.attachNewNode(jointName)
 
 
         if (joint):
         if (joint):
             if localTransform:
             if localTransform: