[Closed] Rotate one object using axis of another?
I want to write a script that causes one object to rotate along a specific axis (x, y, or z) of a second object (the second object being an object which itself rotates…) Anyone who can show me how to do this or give me a push in the right direction?
Also, I want this to be dynamically updating… I assume that I will want to use the second object as a DependsOn. Would that be the right way to do this? Thanks in advance!
What version of max? in max 8 and above, dependsOn is obsolete. You should look at using a scripted controller, or possibly just wiring the rotation parameters. It depends on exactly what you’re trying to do. What do you mean by “dynamically updating…” What exactly determines the rotation…?
You might not need a script at all. Look at linking a dummy’s position to the master, but not its rotation. Then link the slave to the dummy and keyframe the dummy’s rotation.
If you end up using a script, look at the “in coordsys node” context. Any rotations done to an object will be relative to the node you set.
I would think that you’d want to either link the second object to the first and set it to inherit rotation along specific axes, or setup an Orientation Constraint on the second object with the first object as its target. You shouldn’t need any scripting for what you’re describing…