简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM