Platforms to show: All Mac Windows Linux Cross-Platform

Back to SCNPhysicsWorldMBS class.

SCNPhysicsWorldMBS.gravity as SCNVector3MBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A vector that specifies the gravitational acceleration applied to physics bodies in the physics world.

The components of this vector are measured in meters per second per second. The default value is (0.0,-9.8,0.0).
This property applies a constant acceleration to all physics bodies in the world, simulating the effect of gravity near the surface of the Earth. For more sophisticated gravity effects, including limited areas of effect and strength proportional to distance, use the SCNPhysicsFieldMBS class. When using fields, you may want to set this property to the zero vector so that fields provide all gravity effects in the physics world.
(Read and Write property)

SCNPhysicsWorldMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Internal object reference.

(Read and Write property)

SCNPhysicsWorldMBS.speed as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The rate at which the simulation executes.

The default value is 1.0, which means that the simulation runs at normal speed. A value other than the default changes the rate at which time passes in the physics simulation. For example, a speed value of 2.0 indicates that time in the physics simulation passes twice as fast as the scene’s simulation time. A value of 0.0 pauses the physics simulation.

Note:
Increasing the speed of the physics simulation reduces its accuracy.
(Read and Write property)

SCNPhysicsWorldMBS.timeStep as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The time interval between updates to the physics simulation.

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 SCNViewMBS object rendering your scene).
(Read and Write property)

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...