Instance Property

timeStep

The time interval between updates to the physics simulation.

Declaration

@property(nonatomic) NSTimeInterval timeStep;

Discussion

SceneKit processes the physics simulation and updates the state of all physics bodies once per the time interval specified by this property. The default value is 1/60 second (a rate of 60 Hz).

A faster simulation rate provides more accuracy in simulation results—such as collisions between fast-moving objects—but at a higher cost in CPU time (which may in turn slow down your app’s rendering frame rate). Typically, you should set this property to match your target rendering frame rate (as defined by the preferredFramesPerSecond property of the SCNView object rendering your scene).

See Also

Managing the Physics Simulation

gravity

A vector that specifies the gravitational acceleration applied to physics bodies in the physics world.

speed

The rate at which the simulation executes.

- updateCollisionPairs

Forces the physics engine to reevaluate possible collisions between physics bodies.