mwg API
    Preparing search index...

    Type Alias CollideXZ

    CollideXZ: (
        from: { x: number; z: number },
        to: { x: number; z: number },
    ) => { blocked?: boolean; x: number; z: number }

    Clamps one frame's intended horizontal move to wherever collision actually allows - the hook mwg/3d's own grid collision (resolveCapsuleAgainstGrid) plugs into. blocked, when the resolver reports it (resolveCapsuleAgainstGrid always does), tells update directly whether the move was cut short, rather than update re-deriving the same fact by comparing the resolved position against the intended one through separate floating-point arithmetic - two numbers that are conceptually equal are not guaranteed bit-identical.

    Type Declaration

      • (
            from: { x: number; z: number },
            to: { x: number; z: number },
        ): { blocked?: boolean; x: number; z: number }
      • Parameters

        • from: { x: number; z: number }
        • to: { x: number; z: number }

        Returns { blocked?: boolean; x: number; z: number }