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

    Apr 08 2013 | 9:12 pm
    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.

    • Apr 08 2013 | 10:54 pm
      looks like you pasted the wrong patch, as there's no gl.node.
      maybe try again?
    • Apr 08 2013 | 11:07 pm
      Ive just checked...its there you just have to scroll across to right
    • Apr 09 2013 | 12:22 am
      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.
    • Apr 09 2013 | 10:43 am
      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.
    • Apr 09 2013 | 6:37 pm
      again, you don't need to send the position values to both the gl.node and the child gridshapes.
    • Apr 09 2013 | 6:54 pm
      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.