jit.anim.node and jit.anim.drive question?

cap10subtext's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Maybe I'm just too tired to grasp what I'm doing wrong. I want the cylinder jit.phys.body to float along under the position of the camera but without rotating along with it. But hooking up jit.anim.drive like this doesn't work. The rotation goes out of whack and instead of moving relative to it's own rotation, it always moves relative to the world. Maybe I'm just missing a jit.anim.node somewhere? Or am I not grasping an incompatibility with jit.anim.node and jit.anim.drive?

Rob Ramirez's icon

if i understand you properly, you simply need to disable @inherit_rotate on the jit.anim.node attached to the phys.body.

you also want to enable @kinematic on the phys.body, so that it properly collides with other objects in the world.

cap10subtext's icon

I just tried that to be sure but no, it still has the same odd behaviour.

Try navigating with jit.anim.drive as follows. Move forward (w), then move backward (s) then turn the camera 180 degrees by using your mouse on the window. Moving "forward" now moves the camera backward, and vice versa. Then try the same steps with jit.anim.drive hooked directly to the jit.gl.camera. When you spin 180 the back button moves the camera "back" relative to it's own rotation, which is how I would have imagined it to behave whether a placeholder jit.anim.node was there or not.

Which is why I was assuming I'm using jit.anim.node incorrectly.

cap10subtext's icon

Am I correct in assuming this is a bug then or are you not able to reproduce?

Rob Ramirez's icon

ahh, i see your problem. you just need to set @movemode local on the jit.anim.node attached to the gl.camera. this will make the move animation messages apply to the local axes, rather than to the parent axes (which is the default).

cap10subtext's icon

AH! Yep, that was it. I knew I was doing something wrong. And then @inherit_rotate 0 on the node above the collision cylinder gives me the effect I was looking for. Thanks!