Difference between revisions of "pointed thing"

From Minetest Developer Wiki
Jump to navigation Jump to search
(→‎Examples: use a wikitable)
(Add UnofficialLua warning)
Line 1: Line 1:
 +
{{UnofficialLua}}
 
{{DISPLAYTITLE:pointed_thing}}
 
{{DISPLAYTITLE:pointed_thing}}
 
Table <source enclose="none">{type = …, under = …, above = …, ref = …}</source>
 
Table <source enclose="none">{type = …, under = …, above = …, ref = …}</source>

Revision as of 09:59, 9 September 2019

Mbox warning.png This page contains unofficial, low-quality Lua API documentation and is likely to be outdated or wrong. Do not rely on it!
For the official and up-to-date documentation, see Lua API Documentation.
Mbox warning.png This page has been proposed for deletion for the following reason: "Contains unofficial and potentially outdated, redundant and inconsistent Lua API information"
If you don't think that this page should be deleted, please explain why on the talk page.

Table {type = …, under = …, above = …, ref = …}

  • type
  • "nothing"
  • "node"
  • "object"

Notes

  • The utility function minetest.get_pointed_thing_position(pointed_thing, above) can be used to calculate the position of pointed_thing without having to distinguish all possible types.

Examples

{type="nothing"}
{type="node", under=pos, above=pos}
{type="object", ref=ObjectRef}
image Node coordinates pointed_thing.above pointed_thing.under
pointed thing 1.png (49,6,-13) {x = 49, y = 7, z = -13} {x = 49, y = 6, z = -13}
pointed thing 2.png (50,7,-13) {x = 49, y = 7, z = -13} {x = 50, y = 7, z = -13}
pointed thing 3.png (49,7,-14) {x = 49, y = 7, z = -13} {x = 49, y = 7, z = -14}