pointed.lua 977 B

123456789101112131415161718192021
  1. ---@meta
  2. ---pointed_thing
  3. ----------------
  4. ---@class mt.PointedThing
  5. ---@field type "nothing"|"node"|"object"
  6. ---@field under mt.Vector Refers to the node position behind the pointed face.
  7. ---@field above mt.Vector Refers to the node position in front of the pointed face.
  8. ---@field ref mt.ObjectRef|nil
  9. ---The absolute world coordinates of the point on the selection box which is
  10. ---pointed at. May be in the selection box if the pointer is in the box too.
  11. ---@field intersection_point mt.Vector|nil
  12. ---The ID of the pointed selection box (counting starts from 1).
  13. ---@field box_id number|nil
  14. ---Unit vector, points outwards of the
  15. ---selected selection box. This specifies which face is pointed at.
  16. ---Is a null vector `vector.zero()` when the pointer is inside the selection box.
  17. ---For entities with rotated selection boxes, this will be rotated properly
  18. ---by the entity's rotation - it will always be in absolute world space.
  19. ---@field intersection_normal mt.Vector|nil