Description

Constraints translation and a single axis of rotation. See also: ConstraintComponent.

Example

// Create a constraint on an object
var hingeConstraint = hingeObj.createComponent("Physics.ConstraintComponent");

// Set up options on that constraint
hingeConstraint.debugDrawEnabled = true;
hingeConstraint.constraint = Physics.Constraint.create(Physics.ConstraintType.Hinge);
interface HingeConstraint {
    constraintType: ConstraintType;
    getTypeName(): string;
    isOfType(type): boolean;
    isSame(other): boolean;
}

Hierarchy (view full)

Properties

constraintType: ConstraintType

Description

The type of constraint that is applied.

Methods

  • Returns string

    Description

    Returns the name of this object's type.

  • Parameters

    • type: string

    Returns boolean

    Description

    Returns true if the object matches or derives from the passed in type.

  • Parameters

    Returns boolean

    Description

    Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

Generated using TypeDoc