@pixiv/three-vrm
    Preparing search index...

    Class VRMSpringBoneColliderShapeCapsule

    Represents a shape of a collider.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    inside: boolean

    If true, the collider prevents spring bones from going outside of the capsule instead.

    offset: Vector3

    The offset of the capsule head from the origin in local space.

    radius: number

    The radius of the capsule.

    tail: Vector3

    The offset of the capsule tail from the origin in local space.

    Accessors

    Methods

    • Calculate a distance and a direction from the collider to a target object. It's hit if the distance is negative. The direction will be contained in the given target vector.

      Parameters

      • colliderMatrix: Matrix4

        A matrix represents the transform of the collider

      • objectPosition: Vector3

        A vector represents the position of the target object

      • objectRadius: number

        The radius of the object

      • target: Vector3

        The result direction will be contained in this vector

      Returns number