I need to make a SCNNode click-through. Can you help?
How to disable node hit test in scenekit?
Add a Comment
I need to make a SCNNode click-through. Can you help?
You can use SCNHitTestOption.categoryBitMask to decide which nodes to test.
// check what nodes are clicked
let p = self.convert(theEvent.locationInWindow, from: nil)
let hitResults = self.hitTest(p, options: [.categoryBitMask: 0x01])
If (SCNNode.categoryBitMask & SCNHitTestOption.categoryBitMask) == 0, the node will be ignored.