Platforms to show: All Mac Windows Linux Cross-Platform

Back to SCNPhysicsSliderJointMBS class.

SCNPhysicsSliderJointMBS.jointWithBody(body as SCNPhysicsBodyMBS, axis as SCNVector3MBS, anchor as SCNVector3MBS) as SCNPhysicsSliderJointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a slider joint that anchors a single physics body in space and allows it to slide along a specific axis.

body: The physics body to be controlled by the joint.
axis: The axis along which the first body can slide, relative to the node containing it.
anchor: The point at which the body is pinned, in the local coordinate system of the node containing it.

Returns a new slider joint behavior.

This method defines the location where the body is anchored in the coordinate system of the node containing it. To define its sliding or rotation motion relative to that point, use the properties listed in Limiting the Motion of a Slider Joint.
For a behavior to take effect, add it to the physics simulation by calling the addBehavior method on your scene’s SCNPhysicsWorldMBS object. The physics bodies constrained by the joint must be attached to nodes in the scene.

See also:

SCNPhysicsSliderJointMBS.jointWithBody(bodyA as SCNPhysicsBodyMBS, axisA as SCNVector3MBS, anchorA as SCNVector3MBS, bodyB as SCNPhysicsBodyMBS, axisB as SCNVector3MBS, anchorB as SCNVector3MBS) as SCNPhysicsSliderJointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method SceneKit MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a slider joint connecting two physics bodies.

bodyA: The first physics body to be connected by the joint.
axisA: The axis along which the first body can slide, relative to the node containing it.
anchorA: The point at which the joint connects, relative to the node containing the first body.
bodyB: The second physics body to be connected by the joint.
axisB: The axis along which the second body can slide, relative to the node containing it.
anchorB: The point at which the joint connects, relative to the node containing the second body.

Returns a new slider joint behavior.

This method defines the location where the bodies are pinned together. To define their sliding or rotation motion relative to that point, use the properties listed in Limiting the Motion of a Slider Joint.

For a behavior to take effect, add it to the physics simulation by calling the addBehavior method on your scene’s SCNPhysicsWorldMBS object. The physics bodies constrained by the joint must be attached to nodes in the scene.

See also:

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


The biggest plugin in space...