Rotating jit.gl.multiple with jit.phys.mulitple

Apr 1, 2013 at 10:01pm

Rotating jit.gl.multiple with jit.phys.mulitple

Hi,
I have a patch in which a jit.gl.gridshape is being spread into ring of objects using jit.gl.multiple. Using jit.phys.multiple I am creating physics bodies for each object in the multiple spread so that we can register the collision of these objects with another.
I can send a rotatexyz attribute to the jit.gl.multiple to rotate the entire group together.
However, the jit.phys.multiple bodies do not rotate along with this and are left hanging.
jit.phys.multiple does not have a rotatexyz attribute and I’m not sure how to get this information to it.

Attached is an example of this situation, snagged form the help patch.
Thanks!!
Andrew

– Pasted Max Patch, click to expand. –
#67465
Apr 2, 2013 at 5:21pm

you can do this with the jit.gen qrot operator, which rotates a vector (the individual body positions) by a quaternion (your rotation value).
jit.euler2quat will convert your euler xyz values to a quaternion.

– Pasted Max Patch, click to expand. –
#242706
Apr 2, 2013 at 10:38pm

Awesome! Thanks Rob.
ae

#242707

You must be logged in to reply to this topic.