Class

SKPhysicsJointPin

A joint that pins together two physics bodies, allowing independent rotation.

Declaration

@interface SKPhysicsJointPin : SKPhysicsJoint

Overview

An SKPhysicsJointPin object allows two physics bodies to independently rotate around the anchor point as if pinned together. You can configure how far the two objects may rotate and the resistance to rotation.

Topics

Creating a Pin Joint

+ jointWithBodyA:bodyB:anchor:

Creates a new pin joint.

Configuring a Pin Joint

rotationSpeed

The speed, in radians per second, at which the physics bodies are driven around the pin joint.

shouldEnableLimits

A Boolean value that indicates whether the pin joint’s rotation is limited to a specific range of values.

lowerAngleLimit

The smallest angle allowed for the pin joint, in radians.

upperAngleLimit

The largest angle allowed for the pin joint, in radians.

frictionTorque

The resistance applied by the pin joint to spinning around the anchor point.

Relationships

Inherits From

See Also

Physics Joints

Working with Inverse Kinematics

Gain fine-tuned control of objects that are connected by joints.

SKPhysicsJoint

The abstract superclass for objects that connect physics bodies.

SKPhysicsJointFixed

A joint that fuses two physics bodies together at a reference point.

SKPhysicsJointLimit

A joint that imposes a maximum distance between two physics bodies, as if they were connected by a rope.

SKPhysicsJointSliding

A joint that allows two physics bodies to slide along an axis.

SKPhysicsJointSpring

A joint that simulates a spring connecting two physics bodies.