crashcat docs
    Preparing search index...

    Function getWorldInverseInertia

    • world space inverse inertia of a dynamic body, memoised per step.

      with a step stamp >= 0 the matrix is computed at most once per body per step: the first call for a new stamp computes it into the body's own storage, later calls return that. the returned matrix is the body's storage, read it, don't write it. this is sound for velocity constraint setup because nothing rotates a body between force integration and the end of the velocity solve, and every rotation write that can happen outside the step resets the stamp.

      with STEP_STAMP_NONE the matrix is computed fresh into out and out is returned. use that where bodies rotate between calls: the position solver, ccd, and public getters.

      the caller checks that the body is dynamic; non-dynamic bodies contribute a zero matrix and never reach this.

      Parameters

      • out: Mat4
      • motionProperties: MotionProperties
      • bodyQuaternion: Quat
      • stepStamp: number

      Returns Mat4