Skip to main content

check_distance

Function check_distance 

Source
pub fn check_distance(
    name: &str,
    pos_a_key: &str,
    pos_b_key: &str,
    min_dist: f32,
    max_dist: f32,
) -> BehaviorNode
Expand description

Condition: is the distance between two Vec3 positions within [min, max]?

Reads "{pos_a_key}" and "{pos_b_key}" from the blackboard. Returns Success if min <= dist <= max, Failure otherwise.