rhodonite
    Preparing search index...

    Class SphereCollider

    A sphere collider used for VRM spring bone physics simulation. This collider represents a spherical collision volume that can interact with bones to prevent them from penetrating through solid objects.

    Index

    Constructors

    Accessors

    Methods

    • Calculates collision information between this sphere collider and a bone.

      Parameters

      • bonePosition: Vector3

        The world position of the bone

      • boneRadius: number

        The radius of the bone for collision detection

      Returns { delta: IMutableVector3; distance: number; length: number }

      An object containing the collision direction and penetration distance

      • direction: The normalized vector pointing from the sphere center to the bone
      • distance: The penetration distance (negative if penetrating, positive if separated)
    • 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