rhodonite
    Preparing search index...

    Class CapsuleCollider

    A capsule-shaped collider used for VRM spring bone physics simulation. The capsule is defined by a position (head), tail position, and radius. It can detect collisions with spherical objects like bones.

    Index

    Constructors

    Accessors

    Methods

    • Calculates collision information between this capsule collider and a spherical bone.

      Parameters

      • bonePosition: Vector3

        The world position of the bone

      • boneRadius: number

        The radius of the bone sphere

      Returns { direction: IMutableVector3; distance: number }

      An object containing the collision direction vector and penetration distance. If distance is negative, the bone is penetrating the capsule. The direction points from the capsule surface towards the bone center.

    • Sets the visibility of the collider's gizmo. If the gizmo exists, it will be shown or hidden accordingly.

      Parameters

      • visible: boolean

        Whether the gizmo should be visible

      Returns void