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

aedwards's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

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

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

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.

aedwards's icon

Awesome! Thanks Rob.
ae