Skip to content

Commit

Permalink
Fix child-from-parent transforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Dec 9, 2024
1 parent a580884 commit e0ab4b5
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,9 @@ fn query_and_resolve_tree_transform_at_entity(
}

if result.component_instance::<TransformRelation>(0) == Some(TransformRelation::ChildFromParent)
// TODO(andreas): Should we warn? This might be intentionally caused by zero scale.
&& transform.matrix3.determinant() != 0.0
{
if transform.matrix3.determinant() != 0.0 {
// TODO(andreas): Should we warn? This might be intentionally caused by zero scale.
transform = transform.inverse();
}

transform = transform.inverse();
}

Expand Down

0 comments on commit e0ab4b5

Please sign in to comment.