Skip to main content

describe_position

Function describe_position 

Source
pub fn describe_position(from: Vec3, yaw: f32, target: Vec3) -> String
Expand description

Describes where target is relative to someone at from facing yaw, ready to be spoken. The distance is the straight line in 3D. A height difference (z) of a meter or more is added:

  • "3 o'clock, 12 meters": same height
  • "12 o'clock, 11 meters, 4 meters above"
  • "directly below, 5 meters": nothing to the side