Skip to content
M2O Scripting APIScripting reference
Global objectClient APIGenerated

World

const World: object

Defined in: client/api.d.ts:860

Client-side queries against the currently streamed Mafia II world.

getGroundZ(x, y, z, maxDistance?): number | null

Finds the closest ground surface below a world-space position using the game physics scene.

number

World-space X coordinate of the ray origin.

number

World-space Y coordinate of the ray origin.

number

World-space Z coordinate from which to search downward.

number

Maximum downward probe distance in world units; defaults to 200.

number | null

The ground Z coordinate, or null when no surface is found, physics is unavailable, or maxDistance is not positive.