Skip to content

Commit

Permalink
fix: default rotation when the rotation is infinite
Browse files Browse the repository at this point in the history
  • Loading branch information
kuruk-mm committed Oct 28, 2024
1 parent dff521b commit ec1814f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/scene_runner/components/transform_and_parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ pub fn update_transform_and_parent(
}
}

if !transform.rotation.is_finite() {
transform.rotation = godot::prelude::Quaternion::default();
}

node_3d.set_transform(transform.to_godot_transform_3d_without_scaled());
if transform.scale.x.is_zero_approx() {
transform.scale.x = 0.00001;
Expand Down

0 comments on commit ec1814f

Please sign in to comment.