iOS Developer Library

Developer

SpriteKit Framework Reference SKPhysicsJoint Class Reference

Options
Deployment Target:

On This Page
Language:

SKPhysicsJoint

An SKPhysicsJoint object connects two physics bodies so that they are simulated together by the physics world. You never instantiate objects of this class directly; instead, you instantiate one of the subclasses that defines the kind of joint you want to make. This class implements the common properties of the joint classes provided by Sprite Kit. More...

Conforms To


Import Statement


import SpriteKit @import SpriteKit;

Availability


Available in iOS 7.0 and later.
  • bodyA bodyA Property

    The first body connected by the joint.

    Declaration

    Swift

    var bodyA: SKPhysicsBody!

    Objective-C

    @property(nonatomic, retain) SKPhysicsBody *bodyA

    Import Statement

    import SpriteKit

    Availability

    Available in iOS 7.0 and later.

  • bodyB bodyB Property

    The second body connected by the joint.

    Declaration

    Swift

    var bodyB: SKPhysicsBody!

    Objective-C

    @property(nonatomic, retain) SKPhysicsBody *bodyB

    Import Statement

    import SpriteKit

    Availability

    Available in iOS 7.0 and later.

  • The instantaneous reaction force currently being directed at the anchor point, in Newtons. (read-only)

    Declaration

    Swift

    var reactionForce: CGVector { get }

    Objective-C

    @property(nonatomic, readonly) CGVector reactionForce

    Import Statement

    import SpriteKit

    Availability

    Available in iOS 8.0 and later.

  • Instantaneous reaction torque currently being directed at the anchor point, in Newton-meters. (read-only)

    Declaration

    Swift

    var reactionTorque: CGFloat { get }

    Objective-C

    @property(nonatomic, readonly) CGFloat reactionTorque

    Import Statement

    import SpriteKit

    Availability

    Available in iOS 8.0 and later.