Water::getWaterHeight: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(yay)
 
Line 1: Line 1:
This function set height to the value of z-axis of the water surface.<br><br>This function works with sea and lake. However it does not work with shallow rivers (e.g. raton canyon will return -100000.0f)<br><br>note: seems to return true when you are in water
This function set height to the value of z-axis of the water surface.<br><br>This function works with sea and lake. However it does not work with shallow rivers (e.g. raton canyon will return -100000.0f)<br><br>note: seems to return true when you are in water
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">water.getWaterHeight(x, y, z, height);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.water.getWaterHeight(x, y, z, height);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''x:''' float
*'''x:''' float
Line 11: Line 11:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// todo
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Water_function_c}}
{{Water_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 21:35, 6 May 2017

This function set height to the value of z-axis of the water surface.

This function works with sea and lake. However it does not work with shallow rivers (e.g. raton canyon will return -100000.0f)

note: seems to return true when you are in water

Syntax

mp.game.water.getWaterHeight(x, y, z, height);

Required Arguments

  • x: float
  • y: float
  • z: float
  • height: float

Return value

  • float

Example

// todo

See also

Template:Water s function c