About Store Forum Documentation Contact



Post Reply 
World and local space conversion.
Author Message
smashthewindow Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #2
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
Find all posts by this user Quote this message in a reply
smashthewindow Offline
Member

Post: #3
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: World and local space conversion.
Vec global;
Vec local=global/obj.matrix();
global=local*obj.matrix();
04-17-2013 01:22 PM
Find all posts by this user Quote this message in a reply
Post Reply