self.spine = self.model.controlJoint(None, "modelRoot", "spine")
print(self.spine.getMat())
self.model.setScale(0.1)
self.spine = self.model.controlJoint(None, "modelRoot", "spine")
print(self.spine.getMat())
The print 2 mat is just the same.
So what is the right way to scale the model mesh and model joint?
I think that you instead call “setScale” on the NodePath belonging to the controlled joint itself. (In your example, that being “self.spine”.)
Something like this:
self.spine = self.model.controlJoint(None, "modelRoot", "spine")
print(self.spine.getMat())
self.spine.setScale(0.1)
print(self.spine.getMat())
rdb
September 15, 2024, 8:44am
3
Scaling the model scales everything in it, but you won’t see that reflected in individual calls to getMat(), which only reports the local scale (relative to the parent).
1 Like