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

Oct 26, 2012 at 5:14am

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

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. –
#64938
Oct 26, 2012 at 7:11pm

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.

#234168
Oct 26, 2012 at 10:09pm

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.

#234169
Oct 30, 2012 at 3:31pm

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

#234170
Oct 30, 2012 at 7:14pm

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

#234171
Oct 31, 2012 at 2:05am

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!

#234172

You must be logged in to reply to this topic.