Representations of simple things

Vector (ie. a position)

vector.new(x, y, z)

See [Spatial Vectors] for details.

pointed_thing

  • {type="nothing"}
  • {type="node", under=pos, above=pos}
    • Indicates a pointed node selection box.
    • under refers to the node position behind the pointed face.
    • above refers to the node position in front of the pointed face.
  • {type="object", ref=ObjectRef}

Exact pointing location (currently only Raycast supports these fields):

  • pointed_thing.intersection_point: 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.
  • pointed_thing.box_id: The ID of the pointed selection box (counting starts from 1).
  • pointed_thing.intersection_normal: 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. For entities with rotated selection boxes, this will be rotated properly by the entity's rotation - it will always be in absolute world space.