smashthewindow
Member
|
World and local space conversion.
How would you convert a world space coordinates into a local space coordinates of an an object?
Thank.
|
|
04-12-2013 10:20 PM |
|
Rubeus
Member
|
RE: World and local space conversion.
I'm not sure why you would want to do this; what specifically are you asking for? A position in world space is the same whether you are in local or world space. Just don't multiply it by the matrix of the local space. Or do WorldPoint - ObjPos to get a vector from the object to that world point. I believe you could also multiply the world point by the inverse local matrix, but my memory about this is a little fuzzy.
Is that what you needed?
(This post was last modified: 04-12-2013 11:12 PM by Rubeus.)
|
|
04-12-2013 11:05 PM |
|
smashthewindow
Member
|
RE: World and local space conversion.
(04-12-2013 11:05 PM)Rubeus Wrote: I believe you could also multiply the world point by the inverse local matrix, but my memory about this is a little fuzzy.
Exactly what I need.
Thanks.
|
|
04-13-2013 03:53 AM |
|
Esenthel
Administrator
|
RE: World and local space conversion.
Vec global;
Vec local=global/obj.matrix();
global=local*obj.matrix();
|
|
04-17-2013 01:22 PM |
|