Platforms to show: All Mac Windows Linux Cross-Platform
SCNPhysicsBehaviorMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | SceneKit | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
An SCNPhysicsBehavior object defines a high-level behavior for one or more physics bodies, modifying the results of the physics simulation. Behaviors include joints that connect multiple bodies so they move together and vehicle definitions that cause a body to roll like a car. You never use this class directly; instead, you instantiate one of the subclasses that defines the kind of behavior you want to add to your physics world.Table 1 describes the kinds of behaviors you can create in SceneKit.
Behavior classes implemented by SceneKit
Class Name | Description |
SCNPhysicsHingeJointMBS | Connects two bodies and allows them to pivot around each other on a single axis. |
SCNPhysicsBallSocketJointMBS | Connects two bodies and allows them to pivot around each other in any direction. |
SCNPhysicsSliderJointMBS | Connects two bodies and allows them to slide or rotate relative to one another. Slider joints can also work as motors, applying a force or torque between the two bodies. |
SCNPhysicsVehicleMBS | Simulates a physics body as the chassis of a car or other wheeled vehicle. You control a vehicle in terms of steering, braking, and acceleration, and use SCNPhysicsVehicleWheelMBS objects to define the appearance and physical properties of each of its wheels. |
To use a physics behavior, you follow these steps:
1. Create SCNPhysicsBodyMBS objects and attach them to each node that participates in the behavior.
2. Create and configure a behavior object using one of the subclasses listed in above.
3. Add the behavior to the physics simulation by calling the addBehavior method on your scene’s SCNPhysicsWorldMBS object.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.
- property Handle as Integer
- method Constructor Private
Sub classes:
- class SCNPhysicsBallSocketJointMBS
- class SCNPhysicsConeTwistJointMBS
- class SCNPhysicsHingeJointMBS
- class SCNPhysicsSliderJointMBS
- class SCNPhysicsVehicleMBS
Some methods using this class:
- SCNPhysicsWorldMBS.addBehavior(behavior as SCNPhysicsBehaviorMBS)
- SCNPhysicsWorldMBS.allBehaviors as SCNPhysicsBehaviorMBS()
- SCNPhysicsWorldMBS.rayTestWithSegment(origin as SCNVector3MBS, dest as SCNVector3MBS, options as Dictionary = nil) as SCNPhysicsBehaviorMBS()
- SCNPhysicsWorldMBS.removeBehavior(behavior as SCNPhysicsBehaviorMBS)
The items on this page are in the following plugins: MBS Mac64bit Plugin.
SCNPhysicsBallSocketJointMBS - SCNPhysicsBodyMBS