Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARKit: position vs worldposition vs simdposition

please in very simple language explain the difference between the 3 aforementioned position. I would like to know when to use one versus another.

like image 305
stanley Avatar asked Sep 23 '17 01:09

stanley


1 Answers

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.

like image 103
Xartec Avatar answered Sep 27 '22 17:09

Xartec