I have this code in the didAddNode after an image is recognized. The images are displaying on top of each other in an X pattern. I need them to be one next to the other. I have tried the SCNNode x, y, and z but the image is not moving within the middle point. I have done the anchor to be the reference image before but that also did not get me to the goal. I tried the SCNVector3(0,0,-0.2) the image disappears off the screen
//IMAGE 1
let plane = SCNPlane(width: 0.01 ,height: 0.01)
if let cgImage = ImageUse!.cgImage {
plane.firstMaterial?.diffuse.contents = cgImage
}
let overlayNode = SCNNode.init(geometry: plane)
overlayNode.eulerAngles.x = -Float.pi / 2
node.addChildNode(overlayNode)
//IMAGE 2
let plane2 = SCNPlane(width: 0.01,height: 0.01)
if let cgImage = ImageUse2!.cgImage {
plane2.firstMaterial?.diffuse.contents = cgImage
}
let overlayNode2 = SCNNode.init(geometry: plane2)
overlayNode2.eulerAngles.x = -Float.pi / 4
node.addChildNode(overlayNode2)
Here what is showing up:
This is my goal: