diff --git a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua index 2bb2c7f4e6a865..50da4616dd9d74 100644 --- a/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua +++ b/libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua @@ -2717,8 +2717,10 @@ function do_path() lookahead_bf_dps:y(), path_rate_bf_dps:z(), lookahead_bf_dps:z()) - path_rate_bf_dps:y(lookahead_bf_dps:y()) - path_rate_bf_dps:z(lookahead_bf_dps:z()) + if not Vec3IsNaN(lookahead_bf_dps) then + path_rate_bf_dps:y(lookahead_bf_dps:y()) + path_rate_bf_dps:z(lookahead_bf_dps:z()) + end end --[[