I am creating a box to place in my AR Scene with this code below:
let box = SCNBox(width: side, height: side, length: side, chamferRadius: 0.008)
box.firstMaterial?.diffuse.contents = UIColor(red: 220/255, green: 65/255, blue: 23/255, alpha: 0.6)
box.firstMaterial?.diffuse.contents = UIImage(named:"test1")!
let nodo = SCNNode(geometry: box)
nodo.position = position
What I am trying to figure out is how to make the box have a constant size in screen size (image space).
I would like to have the box node placed in the 3D scene to always look the same size, lets say 30x30 pixels...
So no matter how far or close I am to the box as I move around the ARKit camera moving the phone, I want the box to always show up the same size on screen when in viewport.
How can I achieve that?