Gameplay::getGroundZFor3dCoord: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
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 0, very rarely 1 in the scripts.
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">gameplay.getGroundZFor3dCoord(x, y, z, groundZ, unk);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.gameplay.getGroundZFor3dCoord(x, y, z, groundZ, unk);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' float
*'''x:''' float
Line 12: Line 12:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Gameplay_function_c}}
{{Gameplay_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Revision as of 21:12, 6 May 2017

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 0, very rarely 1 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