I use a UIView as a diffuse material for a SCNPlane so I can display a 2D menu inside my 3D scene.
This works as I expected :
var node:SCNNode = // A child of my ARSCNView's scene
var menuVC:UIViewController = // I keep a strong reference to this view controller
let menuPlane:SCNPlane = // Newly created plane
menuPlane.firstMaterial?.diffuse.contents = menuVC.view
let menuPlaneNode = SCNNode(geometry: menuPlane)
menuPlaneNode.eulerAngles.x = -.pi / 2
node.addChildNode(menuPlaneNode)
However, I can notice a "flash" when the node is added to the scene; further inspection reveals it is the view of menuVC displayed in fullscreen in front of the ARSCNView for 1 frame, then it is rendered inside the scene.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)