Class

SCNPhysicsHingeJoint

A physics behavior that connects two bodies and allows them to pivot around each other on a single axis.

Declaration

@interface SCNPhysicsHingeJoint : SCNPhysicsBehavior

Overview

A hinge has a single degree of freedom (rotation). You can also use a hinge joint to pin a body so that it can only move by rotating around a specific axis in the coordinate space of the node containing it.

Topics

Creating a Hinge Joint

+ jointWithBodyA:axisA:anchorA:bodyB:axisB:anchorB:

Creates a hinge joint connecting two physics bodies.

+ jointWithBody:axis:anchor:

Creates a hinge joint that anchors a single physics body in space and lets it rotate around a specific axis.

Managing the Characteristics of a Hinge Joint

bodyA

The first physics body connected by the joint.

axisA

The axis that the hinge pivots around, relative to the node containing the first body.

anchorA

The point at which the hinge connects, relative to the node containing the first body.

bodyB

The second physics body connected by the joint.

axisB

The axis that the hinge pivots around, relative to the node containing the second body.

anchorB

The point at which the hinge connects, relative to the node containing the second body.

Relationships

Inherits From

See Also

Joints

SCNPhysicsSliderJoint

A physics behavior that connects two bodies and allows them to slide against each other and rotate around their connecting points.

SCNPhysicsBallSocketJoint

A physics behavior that connects two physics bodies and allows them to pivot around each other in any direction.