Gameplay::getGroundZFor3DCoord2

From RAGE Multiplayer Wiki
Revision as of 11:15, 29 April 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| Similar to Gameplay::getGroundZFor3dCoord but excludes objects that are on the floor. ===Required Params=== *'''x:''' {{RageType|float}} *'''y:''' {{RageType|float}} *'''z:''' {{RageType|float}} *'''waterAsGround:''' {{RageType|boolean}} *'''ignoreWaterLevelCheck:''' {{RageType|boolean}} ===Return value=== *''' {{RageType|float}} ''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.gameplay.getGroundZFor3DCoord2(x, y,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Similar to Gameplay::getGroundZFor3dCoord but excludes objects that are on the floor.

Required Params

  • x: float
  • y: float
  • z: float
  • waterAsGround: boolean
  • ignoreWaterLevelCheck: boolean

Return value

  • float

Syntax

mp.game.gameplay.getGroundZFor3DCoord2(x, y, z, waterAsGround, ignoreWaterLevelCheck);

Example

const {x, y, z} = mp.players.local.position;
const groundZ = mp.game.gameplay.getGroundZFor3DCoord2(x, y, z, false, false);
mp.console.logInfo(`groundZ is ${groundZ}`);


See also