please in very simple language explain the difference between the 3 aforementioned position. I would like to know when to use one versus another.
The worldPosition is the position in the scene, relative to the center of the world (0,0,0), which is where the rootNode of the scene is.
The position is the position of a node relative to its parent node. If the node is a child of the rootNode, the position is the same as the worldPosition. If the node is a child of a parent that is not at 0,0,0 and/or rotated, the position will be the offset from the parentnode, and the worldPosition will be the child node’s actual position in the scene.
The simdPosition is the same as the position but in a type that can be used by simd related functions, which offer better performance especially if you do a lot of vector math. If you do use simdPosition keep in mind you also should use the simd equivalent of any matrices and other vectors you multiply it with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With