position of SCN Objects - beginner's question

Hey guys. I am having a little one with the ARKit. Not gonna lie that things is dope. Anyway,
These are CGFloat values for SCNSphere
Code Block
ballNode.position = SCNVector3(0.5, -0.3, -1)

These are for SCNText
Code Block
labelNode.position = SCNVector3(-50, 0, -100)

To place the Sphere where I wanted to I had to use, I Suppose, meters.
However for placing the Text I used centimetres. Why? Would anyone be that helpful and redirected me to some documentation about this as I did not find anything? Many Thanks

Answered by maxxfrazer in 653759022
I would guess that the labelNode has a parent with a scale of [0.01, 0.01, 0.01].
Scale (as well as position and rotation) is inherited from the node's parent, so if a parent node has a very small scale, then even if the parent scale is increased again, the position will be multiplied by the parent's scale.

There are some methods in SceneKit to help with the maths involved in these operations such as this one:
https://developer.apple.com/documentation/scenekit/scnnode/1408018-convertposition

And you can set the worldPosition of a node too
https://developer.apple.com/documentation/scenekit/scnnode/2867405-worldposition
Accepted Answer
I would guess that the labelNode has a parent with a scale of [0.01, 0.01, 0.01].
Scale (as well as position and rotation) is inherited from the node's parent, so if a parent node has a very small scale, then even if the parent scale is increased again, the position will be multiplied by the parent's scale.

There are some methods in SceneKit to help with the maths involved in these operations such as this one:
https://developer.apple.com/documentation/scenekit/scnnode/1408018-convertposition

And you can set the worldPosition of a node too
https://developer.apple.com/documentation/scenekit/scnnode/2867405-worldposition
position of SCN Objects - beginner's question
 
 
Q