Jit.gl.node anchor/center of rotation point not moving when xyz position changed

ollieayre1's icon

Hi
Ive been trying to figure this out for ages. Basically the center of rotation for a jit.gl.node object, which contains the 4 quarters that up a whole cube, is not moving when the position of the node is changed. Ive tried modifying the @anchor attribute but that just seems to knock things even further out of sync.

Hopefully someone can work this out...the patch is pretty self explanatory.

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

thanks

Rob Ramirez's icon

looks like you pasted the wrong patch, as there's no gl.node.
maybe try again?

ollieayre1's icon

Ive just checked...its there you just have to scroll across to right

Rob Ramirez's icon

why are you also sending the position values to the child gridshapes?
removing the "s cubecoords1" gives me expected behavior.

you can position the gl.node, and the gridshapes will maintain there same relative position, allowing you to rotate the 4 objects around the gl.node origin.

if that doesn't fix your problem, please give more info about what you think is wrong, including steps to reproduce.

ollieayre1's icon

Sorry i probably didn't explain it very well. Basically the cube is actually split into 4 quarters, if you hit the large bang on the right you'll see them explode outwards and then return back to the cube. The "s cubecoords1" is to control this animation. The node object (parent) is there so that the 4 quarters of the cube can be moved and supposedly rotated as a whole cube and then when you hit the bang the animation will occur in the correct place.

The problem:

When the position of the whole cube(node object) is set to 0. 0. 0. then using rotatexyz you can rotate around its centre however when the position coordinates are set differently the rotation anchor remains at 0. 0. 0. so the cube cant be rotated around its own centre. Ive tried changing the @anchor attributes however that only allows you to offset the cube from its centre, not move the centre to the cube.

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

again, you don't need to send the position values to both the gl.node and the child gridshapes.

ollieayre1's icon

ahh sorry you're right and that solves the problem.

I've spent so long trying to figure it out i got stuck looking at it the wrong way.

Thanks for taking the time to look at it.