Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative scale on transforms causes collider to stop detecting collisions. #287

Closed
Sandvoxel opened this issue Dec 29, 2023 · 1 comment · Fixed by #472
Closed

Negative scale on transforms causes collider to stop detecting collisions. #287

Sandvoxel opened this issue Dec 29, 2023 · 1 comment · Fixed by #472
Labels
A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality C-Bug Something isn't working

Comments

@Sandvoxel
Copy link

I've encountered an issue in the Bevy XPBD 3D plugin where applying a negative scale to an entity's transform seems to prevent its collider from interacting as expected. Specifically, when a negative scale is applied to an entity, the collider associated with it appears to stop detecting collisions or behaving correctly in the physics simulation.

Steps to Reproduce:

  1. Create an entity with a collider component.
  2. Apply a negative scale to the entity's transform (e.g., Transform::from_scale(Vec3::new(-1.0, 1.0, 1.0))).
  3. Observe the behavior of the collider in the physics simulation.

Expected Behavior:
The collider should continue to function normally, detecting collisions and responding to physics interactions, regardless of the entity's scale sign.

Actual Behavior:
The collider ceases to detect collisions or respond correctly once a negative scale is applied.

I am unsure if this is an intended behavior or a bug. Any insights or suggestions on how to address this issue would be greatly appreciated.

@Jondolf Jondolf added C-Bug Something isn't working A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality labels Dec 29, 2023
@Jondolf
Copy link
Owner

Jondolf commented Jul 28, 2024

This should be mostly fixed as of #472, and collisions should now work with negative scales; feel free to reopen this or open a new issue if that's not the case (it can vary per shape!)

Note that there may still be some shapes that don't get mirrored correctly at the moment, and there's an issue where negative scale might be propagated wrong for collider hierarchies. See #471.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality C-Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants