User Tools

Site Tools


guides:compute-water-elevation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
guides:compute-water-elevation [2020/04/22 12:45] vjraymonguides:compute-water-elevation [2020/04/22 13:13] vjraymon
Line 6: Line 6:
 The following LUA code computes and returns the global Y elevation of water from a global position: The following LUA code computes and returns the global Y elevation of water from a global position:
  
- +<code lua> 
 function MY_CUSTOM_COMPONENT:computeWaterElevation(_globalPosition) function MY_CUSTOM_COMPONENT:computeWaterElevation(_globalPosition)
     local raycastResult = {}     local raycastResult = {}
Line 27: Line 27:
     end     end
 end end
 +</code>
  
 You can do the same with the ground by replacing OBJECT_FLAG.WATER by OBJECT_FLAG.GROUND You can do the same with the ground by replacing OBJECT_FLAG.WATER by OBJECT_FLAG.GROUND
guides/compute-water-elevation.txt · Last modified: 2021/02/23 11:52 by minotorious

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki