A Boolean value that determines whether gravity, as defined by the scene’s physics simulation, affects the motion of particles.
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Gravity applies a constant acceleration to all particles in the system. SceneKit offers two options for simulating the effect of gravity on particles:
isproperty, which uses the
Affected By Gravity
gravityvector specified by the
physicsobject of the scene containing the particle system. Use this option when you want the system’s particles to be affected by the same gravity as the
SCNPhysicsobjects in your scene.
accelerationproperty, which is independent of the simulation SceneKit uses for physics bodies in the scene. Use acceleration to simulate gravity if you have no
SCNPhysicsobjects in your scene, or if you want particles to be affected both by the physics world’s gravity and another constant acceleration (such as wind).
The default value is
false, specifying that the physics world’s gravity does not affect particles.