minetest_x_bows/types/pointed-thing.type.lua
2022-10-12 21:13:06 -04:00

12 lines
1.1 KiB
Lua

---https://github.com/sumneko/lua-language-server/wiki
---Pointed thing definition
---@class PointedThingDef
---@field type string e.g. `{type="nothing"}` `{type="node"}` `{type="object"}`
---@field under Vector Refers to the node position behind the pointed face.
---@field above Vector Refers to the node position in front of the pointed face.
---@field ref ObjectRef e.g. `{type="object", ref=ObjectRef}`
---@field intersection_point Vector Exact pointing location (currently only `Raycast` supports these field). The absolute world coordinates of the point on the selection box which is pointed at. May be in the selection box if the pointer is in the box too.
---@field box_id number|integer Exact pointing location (currently only `Raycast` supports these field). The ID of the pointed selection box (counting starts from 1).
---@field intersection_normal Vector Exact pointing location (currently only `Raycast` supports these field). Unit vector, points outwards of the selected selection box. This specifies which face is pointed at. Is a null vector `vector.zero()` when the pointer is inside the selection box.