Function approach_target_pos

Source
fn approach_target_pos(
    ctx: &mut NpcCtx<'_, '_>,
    approach_pos: Vec2<f32>,
    default_alt: f32,
    height: f32,
) -> Vec3<f32>
Expand description

Get the target position for airship movement given the target position, the default height above terrain, and the height above terrain for the airship route cruise phase. This samples terrain points aound the target pos to get the maximum terrain altitude in a 200 block radius of the target position (only checking 4 cardinal directions). and returns the input approach_pos with z equal to the maximum terrain alt + height or the default_alt whichever is greater.