I use the "DAE" model as SCNGeometry.

Trying to use it as a physical form of the body:
let url = Bundle.main.url(forResource: "art.scnassets/half", withExtension: "dae")
let sceneSource = SCNSceneSource(url: url!, options: nil)
let tubeGeometry = (sceneSource?.entryWithIdentifier("Cube-mesh", withClass: SCNGeometry.self ))! as SCNGeometry
tubeNode = SCNNode(geometry: tubeGeometry)
tubeNode.position = SCNVector3(0, 1, 0)
tubeNode.eulerAngles = SCNVector3Make(1.5, 2, 0)
let tubeShape = SCNPhysicsShape(geometry: tubeGeometry, options: nil)
let tubeBody = SCNPhysicsBody(type: .static, shape: tubeShape)
tubeNode.physicsBody = tubeBody
scene.rootNode.addChildNode(tubeNode)
Do not perceive the properties of geometric objects (edges, faces, etc.). Understands the cube as it seems. Thus, the ball collides with an invisible plane, which is not my object, but should fall inward, as in the screenshot below:

Any ideas / tips, why? Please help me solve this problem ...
Thanks in advance!
source
share