User Tools

Site Tools


4rpl:commands:getpointerterraincoords

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
4rpl:commands:getpointerterraincoords [2021/02/13 12:05] virgilw4rpl:commands:getpointerterraincoords [2024/09/10 14:57] (current) – Although this is about Cells, its not a ceil'ed integer. Vertu
Line 6: Line 6:
  
 ===== Description ===== ===== Description =====
-Gets the map cell coordinates current pointed at by the game pointer (the mouse). A ray projection is done from the pointer through the 3D world and +Gets the map cell coordinates current pointed at by the game pointer (the mouse). A ray projection is done from the pointer through the 3D world and a collision is checked at each terrain height level. So this API will return the location on the map surface that the pointer is pointing towards
-a collision is checked at each terrain height level. So this API will return the location on the map surface that the pointer is pointing towards.+ 
 +:NOTE: The returned coordinates are floats, not integers. If you wish to use this API to obtain cell coordinates rather than world-space, use the [[4rpl:commands:ceil|Ceil]] operator to round into an integer.\\ 
 +This API also works outside the map boundaries.
  
 ===== Examples ===== ===== Examples =====
4rpl/commands/getpointerterraincoords.txt · Last modified: 2024/09/10 14:57 by Vertu