I have an object and I want to get the world positions for each of its vectors (length 1).
How can I achieve this?
The local positions would be
(1,0,0)
(0,1,0)
(0,0,1)
but I need to know the world space coordinates.
Thanks in advance.
I have an object and I want to get the world positions for each of its vectors (length 1).
How can I achieve this?
The local positions would be
(1,0,0)
(0,1,0)
(0,0,1)
but I need to know the world space coordinates.
Thanks in advance.
GameObjects have a Transform, available as the .transform shortcut, and also as a MonoBehavior shortcut.
The .position value in Transform is world space, the .localPosition is relative to its parent, which if nothing, is also world space.
This is the reference for the Transform component, found on every GameObject:
I already knew that. It still doesn’t solve my question.