Set a rotation center point other than 0,0,0 to a scenenode?
Set a rotation center point other than 0,0,0 to a scenenode?
Is that possible? I need this for a physics engine I'm making. ISceneNode doesn't seem to have any member function doing that, and I don't want to do this in the modeller.
Rotating by x degrees
Object position o
Centre of rotation c
Rotate it around 0,0,0 by x
Get a vector from the object and the centre of rotation, call it v (v = o-c )
Rotate this vector, v, by x ( v.rotate(x) )
Move the object to the end of the vector v. ( o = c+v )
How about that?
Object position o
Centre of rotation c
Rotate it around 0,0,0 by x
Get a vector from the object and the centre of rotation, call it v (v = o-c )
Rotate this vector, v, by x ( v.rotate(x) )
Move the object to the end of the vector v. ( o = c+v )
How about that?
djceejay
Studying :: BSc Computer Games Technology :: UK
Studying :: BSc Computer Games Technology :: UK