Skip to main content

face_direction

Function face_direction 

Source
pub fn face_direction(
    name: &str,
    agent_pos_key: &str,
    target_pos_key: &str,
    yaw_key: &str,
) -> BehaviorNode
Expand description

Instantly snap the agent’s yaw to face a target position.

Reads:

  • "{agent_pos_key}" — Vec3
  • "{target_pos_key}" — Vec3

Writes:

  • "{yaw_key}" — f64 yaw angle in radians