A capsule collision shape. Also known as a capped cylinder.

interface CapsuleShape {
    axis: Axis;
    length: number;
    radius: number;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

axis: Axis

Lengthwise local axis along which the capsule is oriented.

length: number

Length of the capsule along its local axis. This is the distance between the two end-cap centers.

radius: number

Radius of the capsule cylinder, and its end-cap spheres.

Methods

  • Returns the name of this object's type.

    Returns string

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

    Parameters

    • type: string

    Returns boolean

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

    Parameters

    Returns boolean