0

SCNAction.move(to:SCNVector3) doesn't work. It moves the shape but the shape doesn't fall.

There's some other action?

Andrea P.
  • 55
  • 8

1 Answers1

1

If you haven't already, you'll need to give your SCNNode a physicsBody and configure it prior to adding the node to the scene.

let body = SCNPhysicsBody(type: SCNPhysicsBodyType, shape: SCNPhysicsShape)
myNode.physicsBody = body

Then you can set the .isAffectedByGravity property to true.

myNode.physicsBody?.isAffectedByGravity = true

Now, when you add the node to the scene, it will fall.

Gene M.
  • 130
  • 9