Gameplay::getGroundZFor3dCoord: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
No edit summary
Line 1: Line 1:
Gets the ground elevation at the specified position. Note that if the specified position is below ground level, the function will output zero!<br><br>x: Position on the X-axis to get ground elevation at.<br>y: Position on the Y-axis to get ground elevation at.<br>z: Position on the Z-axis to get ground elevation at.<br>groundZ: The ground elevation at the specified position.<br>unk: Nearly always 0, very rarely 1 in the scripts.
Gets the ground elevation at the specified position. Note that if the specified position is below ground level, the function will output zero!<br><br>x: Position on the X-axis to get ground elevation at.<br>y: Position on the Y-axis to get ground elevation at.<br>z: Position on the Z-axis to get ground elevation at.<br>groundZ: The ground elevation at the specified position.<br>unk: Nearly always false, very rarely true in the scripts.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.gameplay.getGroundZFor3dCoord(x, y, z, groundZ, unk);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.gameplay.getGroundZFor3dCoord(x, y, z, groundZ, unk);</syntaxhighlight>

Revision as of 17:32, 2 February 2019

Gets the ground elevation at the specified position. Note that if the specified position is below ground level, the function will output zero!

x: Position on the X-axis to get ground elevation at.
y: Position on the Y-axis to get ground elevation at.
z: Position on the Z-axis to get ground elevation at.
groundZ: The ground elevation at the specified position.
unk: Nearly always false, very rarely true in the scripts.

Syntax

mp.game.gameplay.getGroundZFor3dCoord(x, y, z, groundZ, unk);

Required Arguments

  • x: float
  • y: float
  • z: float
  • groundZ: float
  • unk: Boolean

Return value

  • float

Example

// todo

See also

Template:Gameplay s function c