Class

SKPhysicsJointPin

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

Declaration

class 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

Configuring a Pin Joint

var rotationSpeed: CGFloat

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

var shouldEnableLimits: Bool

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

var lowerAngleLimit: CGFloat

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

var upperAngleLimit: CGFloat

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

var frictionTorque: CGFloat

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

Relationships

Inherits From

Conforms To

See Also

Physics Simulation

Getting Started with Physics

Simulate gravity, acceleration, collision detection, or joints.

class SKPhysicsWorld

The driver of the physics engine in a scene; it exposes the ability for you to configure and query the physics system.

class SKPhysicsBody

An object that adds physics simulation to a node.

class SKPhysicsContact

A description of the contact between two physics bodies.

protocol SKPhysicsContactDelegate

Methods your app can implement to respond when physics bodies come into contact.

class SKFieldNode

A node that applies physics effects to nearby nodes.