Forums > Jitter

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

October 26, 2012 | 5:14 am

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?

– Pasted Max Patch, click to expand. –

October 26, 2012 | 7:11 pm

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.


October 26, 2012 | 10:09 pm

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.


October 30, 2012 | 3:31 pm

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


October 30, 2012 | 7:14 pm

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).


October 31, 2012 | 2:05 am

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!


Viewing 6 posts - 1 through 6 (of 6 total)