rhodonite
    Preparing search index...

    Interface PhysicsStrategy

    interface PhysicsStrategy {
        clearShapeInstances?(): void;
        getVrmSpring?(): VRMSpring | undefined;
        setCollidersVisible?(visible: boolean): void;
        setEulerAngle?(eulerAngles: IVector3): void;
        setPosition?(worldPosition: IVector3): void;
        setRotation?(worldRotation: IQuaternion): void;
        setScale?(worldScale: IVector3): void;
        setShapeInstance?(
            shape: ShapeInstance,
            body: PhysicsBodyProperty,
            collider: PhysicsColliderProperty,
            entity: ISceneGraphEntity,
            worldScale?: IVector3,
            motion?: PhysicsMotionProperty,
        ): void;
        setShapeInstances?(
            bindings: readonly PhysicsShapeInstanceBinding[],
            entity: ISceneGraphEntity,
            worldScale?: IVector3,
            motion?: PhysicsMotionProperty,
        ): void;
        update(config: Config): void;
    }

    Implemented by

    Index
    • Removes the body and all generic analytic-shape colliders.

      Returns void

    • Gets the VRM spring system managed by this physics strategy. This is optional and only implemented by strategies that support VRM spring bones.

      Returns VRMSpring | undefined

      The VRM spring system, or undefined if not supported

    • Sets the visibility of all colliders in this physics strategy. This is optional and only implemented by strategies that support collider visualization.

      Parameters

      • visible: boolean

        Whether the colliders should be visible

      Returns void

    • Sets the world rotation of the physics body with Euler angles. This is optional and only implemented by rigid-body physics strategies. The passed vector may be a shared reusable instance, so implementations must copy the values they need instead of retaining the reference.

      Parameters

      • eulerAngles: IVector3

        The new Euler angles in radians

      Returns void

    • Sets the world position of the physics body. This is optional and only implemented by rigid-body physics strategies. The passed vector may be a shared reusable instance, so implementations must copy the values they need instead of retaining the reference.

      Parameters

      • worldPosition: IVector3

        The new world position

      Returns void

    • Sets the world rotation of the physics body. This is optional and only implemented by rigid-body physics strategies. The passed quaternion may be a shared reusable instance, so implementations must copy the values they need instead of retaining the reference.

      Parameters

      Returns void

    • Sets the world scale of the physics body. This is optional and only implemented by rigid-body physics strategies. The passed vector may be a shared reusable instance, so implementations must copy the values they need instead of retaining the reference.

      Parameters

      • worldScale: IVector3

        The new world scale

      Returns void

    • Parameters

      Returns void