Contents

SKPhysicsWorld

The driver of the physics engine in a scene; it exposes the ability for you to configure and query the physics system.

Declaration

class SKPhysicsWorld

Mentioned in

Overview

SKPhysicsWorld runs the physics engine of a scene and is the place that contact detection occurs. Do not create a SKPhysicsWorld directly; the system creates a physics world and adds it to the scene’s physicsWorld property.

The physics world allows you to:

  • Set important properties like gravity

  • Join two physics bodies using an SKPhysicsJoint

  • Respond to collision between two physics bodies using contactDelegate

  • Do custom collisions detection or hit testing

Topics

Configuring the Physics World

Joining Physics Bodies with Joints

Detecting Collisions

Searching the Scene for Physics Bodies

Sampling Physics Fields

Initializers

See Also

Physics Simulation