Turn Object around Point
Members - Reputation: 433
Posted 26 October 2011 - 07:06 AM
Here's a pic for further explanation:
The Plus is the Box Mesh Origo and the red circle is the Rotation Point.
Thanx in advance
Members - Reputation: 1789
Posted 26 October 2011 - 11:25 AM
Use the resulting matrix M' to transform the coordinate frame of the box. If your box is represented by a center point and three direction vectors, e.g. like OBB here, then remember to use the transformation matrix M' to transform the pivot point of the OBB as a point vector, and the axes of the box as direction vectors. See here.
If you have any questions of the code implementation, I'll try to clarify.
GDNet+ - Reputation: 2722
Posted 26 October 2011 - 11:55 AM
mWorld = mTrans1 * mRotate * mTrans2;
Members - Reputation: 375
Posted 27 October 2011 - 03:02 PM
Master & Mentor