This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
4rpl:commands:getpointerterraincoords [2021/01/08 16:01] – external edit 127.0.0.1 | 4rpl:commands:getpointerterraincoords [2025/06/10 06:04] (current) – Failure case mentioned 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. | + | |
- | The argument | + | : |
+ | This API also works outside the map boundaries. | ||
+ | |||
+ | Should the API fail to find a result, such as the mouse being pointed into the sky, the resulting cells are -1. | ||
===== Examples ===== | ===== Examples ===== |