Skip to content

Commit

Permalink
fix: avian2d colliders flipped (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefKuchar authored Nov 24, 2024
1 parent 930912b commit 33dcf2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/obstacles/avian2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ impl<'a> InnerObstacleSource for TypedShape<'a> {
let ref_to_world = |p: &OPoint<f32, Const<2>>| {
let mut v = vec3(p.x, 0.0, p.y);
v = if up.is_negative_bitmask().count_ones() % 2 == 1 {
Quat::from_rotation_arc(-Vec3::Y, up.into()).mul_vec3(v)
} else {
Quat::from_rotation_arc(Vec3::Y, up.into()).mul_vec3(v)
} else {
Quat::from_rotation_arc(-Vec3::Y, up.into()).mul_vec3(v)
};
transform.transform_point(v)
};
Expand Down

0 comments on commit 33dcf2a

Please sign in to comment.