Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - paulscode

Pages: 1 2 3 [4]
46
Support / Switching Between Pivot Points
« on: February 22, 2008, 05:29:16 am »
Each frame, I am trying to change the rotation pivot of an object from (0,-135,0) to (0,0,0) before doing a rotateAxis() on it, and then change the rotation pivot back to (0,-135,0) afterwards.  It seems like the following code should work:

Code: [Select]
        myObject.setRotationPivot( new SimpleVector( 0, 0, 0 ) );
        myObject.rotateAxis( myObject.getZAxis(), radZ );
        myObject.setRotationPivot( new SimpleVector( 0, -135.0f, 0 ) );

Instead, the object just rotates around the original pivot (0,-135,0), the same as if I don't put any setRotationPivot()'s in there at all.  I am sure there is a simple solution to this, but I can't seem figure it out.

Pages: 1 2 3 [4]