Difference between revisions of "pointed thing"
Jump to navigation
Jump to search
(note about minetest.get_pointed_thing_position) |
Hybrid Dog (talk | contribs) (→Examples: ?sort) |
||
Line 21: | Line 21: | ||
[[File:pointed_thing_1.png|200px]] | [[File:pointed_thing_1.png|200px]] | ||
− | Node coordinates are <code>(49,6,-13)</code>, <code>pointed_thing</code> is <code>{type = "node", above = {y = 7 | + | Node coordinates are <code>(49,6,-13)</code>, <code>pointed_thing</code> is <code>{type = "node", above = {x = 49, y = 7, z = -13}, under = {x = 49, y = 6, z = -13}}</code> |
[[File:pointed_thing_2.png|200px]] | [[File:pointed_thing_2.png|200px]] | ||
− | Node coordinates are <code>(50,7,-13)</code>, <code>pointed_thing</code> is <code>{type = "node", above = {y = 7 | + | Node coordinates are <code>(50,7,-13)</code>, <code>pointed_thing</code> is <code>{type = "node", above = {x = 49, y = 7, z = -13}, under = {x = 50, y = 7, z = -13}}</code> |
[[File:pointed_thing_3.png|200px]] | [[File:pointed_thing_3.png|200px]] | ||
− | Node coordinates are <code>(49,7,-14)</code>, <code>pointed_thing</code> is <code>{type = "node", above = {y = 7 | + | Node coordinates are <code>(49,7,-14)</code>, <code>pointed_thing</code> is <code>{type = "node", above = {x = 49, y = 7, z = -13}, under = {x = 49, y = 7, z = -14}}</code> |
[[Category:Types]] | [[Category:Types]] |
Revision as of 18:00, 4 February 2014
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 ofpointed_thing
without having to distinguish all possible types.
Examples
{type="nothing"}
{type="node", under=pos, above=pos}
{type="object", ref=ObjectRef}
Node coordinates are (49,6,-13)
, pointed_thing
is {type = "node", above = {x = 49, y = 7, z = -13}, under = {x = 49, y = 6, z = -13}}
Node coordinates are (50,7,-13)
, pointed_thing
is {type = "node", above = {x = 49, y = 7, z = -13}, under = {x = 50, y = 7, z = -13}}
Node coordinates are (49,7,-14)
, pointed_thing
is {type = "node", above = {x = 49, y = 7, z = -13}, under = {x = 49, y = 7, z = -14}}