Description

Fully constrain rotation and translation. See also: ConstraintComponent.

Example

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

// Set up options on that constraint
fixedConstraint.debugDrawEnabled = true;
fixedConstraint.constraint = Physics.Constraint.create(Physics.ConstraintType.Fixed);
interface FixedConstraint {
    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