Forums > MaxMSP

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

April 1, 2013 | 10:01 pm

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

April 2, 2013 | 5:21 pm

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

April 2, 2013 | 10:38 pm

Awesome! Thanks Rob.
ae


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