From 532347967010edc13546270efd873130809e4b4e Mon Sep 17 00:00:00 2001 From: Nova Date: Sat, 10 Sep 2022 08:54:01 -0400 Subject: [PATCH] fix(spatial): handle case of NaN rotation from 0 scale matrix --- src/nodes/spatial.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nodes/spatial.rs b/src/nodes/spatial.rs index 6a33fc4..6da8ba2 100644 --- a/src/nodes/spatial.rs +++ b/src/nodes/spatial.rs @@ -82,6 +82,8 @@ impl Spatial { } if let Some(rot) = rot { reference_space_rot = rot + } else if reference_space_rot.is_nan() { + reference_space_rot = Quat::IDENTITY; } if let Some(scl) = scl { reference_space_scl = scl