The global simulation of collisions, gravity, joints, and other physics effects in a scene.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Scene
Kit
Declaration
@interface SCNPhysicsWorld : NSObject
Overview
You do not create SCNPhysics
objects directly; instead, read the physics
property of an SCNScene
object. Use physics world object to perform the following tasks:
Manage global properties of the simulation, such as its speed and constant gravity. (For more precise control of gravity and similar effects, see the
SCNPhysics
class.)Field Register behaviors that modify interactions between the scene’s physics bodies, such as joints and vehicles. For more details, see
SCNPhysics
.Behavior Specify a delegate object to receive messages when two physics bodies contact each other
Perform specific contact tests, and search for physics bodies in the scene using ray and sweep tests.