diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h index 0bea35efe3..1f99737825 100644 --- a/include/SSystem/SComponent/c_xyz.h +++ b/include/SSystem/SComponent/c_xyz.h @@ -31,7 +31,17 @@ struct cXyz : Vec { z = vec.z; } #else - cXyz() = default; + cXyz() { + if (std::isnan(x)) { + x = 0.0f; + } + if (std::isnan(y)) { + y = 0.0f; + } + if (std::isnan(z)) { + z = 0.0f; + } + } ~cXyz() = default; cXyz(const cXyz& vec) = default; #endif