Instance Property

physicsBody

The physics body associated with the node.

Declaration

@property(nonatomic, retain) SKPhysicsBody *physicsBody;

Discussion

The default value is nil, which indicates that the node does not participate in the physics simulation at all. If a physics body is provided, when the scene’s physics are simulated, the physics body updates the node’s position and rotates the node.

See Also

Adding Physics Behaviors

Getting Started with Physics Bodies

Create and assign a physics body to enable physics.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software