aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBeha <shacknetisp@mail.com>2019-08-30 13:40:08 -0400
committerSmallJoker <SmallJoker@users.noreply.github.com>2019-08-30 19:40:08 +0200
commit99ca72e9dfb889c68389fb93cff98715c9821950 (patch)
tree92c90085e90005482a47c7db2e2a30bcbc045605 /doc
parent4291961e09db7851fbc940eac58a1b919668d935 (diff)
downloadminetest-99ca72e9dfb889c68389fb93cff98715c9821950.tar.gz
minetest-99ca72e9dfb889c68389fb93cff98715c9821950.tar.bz2
minetest-99ca72e9dfb889c68389fb93cff98715c9821950.zip
Clarify docs regarding pointed_thing and get_pointed_thing_position (#8766)
Diffstat (limited to 'doc')
-rw-r--r--doc/lua_api.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt
index eaca09fe9..bfd983296 100644
--- a/doc/lua_api.txt
+++ b/doc/lua_api.txt
@@ -1325,6 +1325,9 @@ For helper functions see [Spatial Vectors].
* `{type="nothing"}`
* `{type="node", under=pos, above=pos}`
+ * Indicates a pointed node selection box.
+ * `under` refers to the node position behind the pointed face.
+ * `above` refers to the node position in front of the pointed face.
* `{type="object", ref=ObjectRef}`
Exact pointing location (currently only `Raycast` supports these fields):
@@ -4543,7 +4546,10 @@ Item handling
* `minetest.inventorycube(img1, img2, img3)`
* Returns a string for making an image of a cube (useful as an item image)
* `minetest.get_pointed_thing_position(pointed_thing, above)`
- * Get position of a `pointed_thing` (that you can get from somewhere)
+ * Returns the position of a `pointed_thing` or `nil` if the `pointed_thing`
+ does not refer to a node or entity.
+ * If the optional `above` parameter is true and the `pointed_thing` refers
+ to a node, then it will return the `above` position of the `pointed_thing`.
* `minetest.dir_to_facedir(dir, is6d)`
* Convert a vector to a facedir value, used in `param2` for
`paramtype2="facedir"`.