Transformation a point to an object's frame of reference Author Message
IzumiRaito
Member

 Post: #1 Transformation a point to an object's frame of reference Hello i need to transform one object (let's call it A) position from global frame of reference to another object's (let's call it B) frame of reference. Is Vec newPos = A->pos() / B->matrix() the right way? A->pos()* ~B->matrix() seems to have similar results
02-08-2011 06:12 PM
Solimo
Member

 Post: #2 RE: Transformation a point to an object's frame of reference I have similar problem. Im not sure about certain thing. What matrix contained in every object transforms. Local to Global, Global to Local. Local to Global with scaling, Global to Local with scaling. If We want transform object B into local space of object A (forward of A is Z axis and A is in (0,0,0)) should i go like this? Vec localB= B->pos(); localB -= A->pos(); localB= localB.mul(~A->matrix());
02-08-2011 07:19 PM
Esenthel

 Post: #3 RE: Transformation a point to an object's frame of reference (02-08-2011 06:12 PM)IzumiRaito Wrote:  Hello i need to transform one object (let's call it A) position from global frame of reference to another object's (let's call it B) frame of reference. Is Vec newPos = A->pos() / B->matrix() the right way? A->pos()* ~B->matrix() seems to have similar results yeah, that's the same thing
02-08-2011 08:36 PM
IzumiRaito
Member

 Post: #4 RE: Transformation a point to an object's frame of reference And considering that the object is derived from Game::Obj, what is the scale?
02-08-2011 08:54 PM
Esenthel