minetest.get_pointed_thing_position

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

Description

Get position of a pointed_thing (that you can get from somewhere).

  • If pointing at a node & above -> return pointed_thing.above
  • If pointing at a node & not above -> return pointed_thing.under
  • If pointing at a objec & object exists -> return object position
  • If pointing at a objec & object does not exists -> return nil
  • If none of the above -> return nil

Example

local pos = minetest.get_pointed_thing_position(pointed, true)
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox