Header menu logo Nu

PhysicsConstraint Type

Stores the current pose for a physics constraint. A physics constraint applies physics to bones.

See Physics constraints in the Spine User Guide.

Constructors

Constructor Description

PhysicsConstraint(data, skeleton)

Full Usage: PhysicsConstraint(data, skeleton)

Parameters:
data : PhysicsConstraintData
skeleton : Skeleton

PhysicsConstraint(constraint, skeleton)

Full Usage: PhysicsConstraint(constraint, skeleton)

Parameters:

Copy constructor.

constraint : PhysicsConstraint
skeleton : Skeleton

Instance members

Instance member Description

this.Active

Full Usage: this.Active

Returns: bool
Modifiers: abstract
Returns: bool

this.Bone

Full Usage: this.Bone

The bone constrained by this physics constraint.

this.Damping

Full Usage: this.Damping

this.Data

Full Usage: this.Data

Returns: PhysicsConstraintData

The physics constraint's setup pose data.

Returns: PhysicsConstraintData

this.Gravity

Full Usage: this.Gravity

this.Inertia

Full Usage: this.Inertia

this.MassInverse

Full Usage: this.MassInverse

this.Mix

Full Usage: this.Mix

A percentage (0-1) that controls the mix between the constrained and unconstrained poses.

this.Reset

Full Usage: this.Reset

this.Rotate

Full Usage: this.Rotate

Parameters:
    x : float32
    y : float32
    degrees : float32

Rotates the physics constraint so next PhysicsConstraint.Update forces are applied as if the bone rotated around the specified point in world space.

x : float32
y : float32
degrees : float32

this.SetToSetupPose

Full Usage: this.SetToSetupPose

this.Strength

Full Usage: this.Strength

this.ToString

Full Usage: this.ToString

Returns: string
Modifiers: abstract
Returns: string

this.Translate

Full Usage: this.Translate

Parameters:
    x : float32
    y : float32

Translates the physics constraint so next PhysicsConstraint.Update forces are applied as if the bone moved an additional amount in world space.

x : float32
y : float32

this.Update

Full Usage: this.Update

Parameters:
Modifiers: abstract

Applies the constraint to the constrained bones.

physics : Physics

this.Wind

Full Usage: this.Wind

this.getData ()

Full Usage: this.getData ()

Returns: PhysicsConstraintData

The physics constraint's setup pose data.

Returns: PhysicsConstraintData

Type something to start searching.