Hiya, this is more of a general question as I’m still relatively new to 3d programming and game dev.
I’ve seen this being used interchangeable to get the world position of an object. ChatGPT said that:
" Yes, that’s correct! If you need the position of an object in the world space, it’s generally better to use GetWorldPosition
. This method directly gives you the global position of the object, which is often what you’re looking for when interacting with or placing objects in a scene.
LocalToWorld
is more useful when you’re working with specific points or vertices within an object’s local space and need to transform them into world space. But for straightforward world position retrieval, GetWorldPosition
is the more direct and easier choice."
Which kind of makes sense, but not exactly, as I still see these being used interchangeable, when just trying to find an objects world position. So is it true that, the localToWorld is often used when you’re dealing with transformations at a lower level, such as matrices and vectors, on their respectable objects localPosition in comparison to the getWorldPosition, that deals with a higher level of the object as a whole in comparison to its world position?