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

Change in collision pushback forces from v.0.24 -> v.0.27? #574

Closed
PraxTube opened this issue Aug 1, 2024 · 2 comments
Closed

Change in collision pushback forces from v.0.24 -> v.0.27? #574

PraxTube opened this issue Aug 1, 2024 · 2 comments

Comments

@PraxTube
Copy link

PraxTube commented Aug 1, 2024

I switched from Bevy 0.12 to 0.14 and updated bevy_rapier from 0.24 to 0.27 (I didn't change any of the rapier configs). There is the following change in collisions and (pushback?) I noticed.

bevy_rapier 0.24, snappy collisions

snappy_collisions

Which changed to the following.

bevy_rapier 0.27, sloppy and slow collisions

sloppy_collisions

It's quite possible that this is something specific to my project as I am setting the linear velocity of the player rigidbody every frame (even when the player doesn't move), though that wouldn't explain the differing behaviour. I also went through the changelogs of both bevy_rapier as well as rapier, but I couldn't find anything that seems related.

My best guess is that some default value was changed which I didn't explicitly set (though I would have expected to see that in the changelogs mentioned). Any help is appreciated.

@Vrixyz
Copy link
Contributor

Vrixyz commented Aug 1, 2024

This looks like you want to tweak depenetration parameters, a few lines on the changelog of rapier is here: https://github.com/dimforge/rapier/blob/master/CHANGELOG.md#v0200-9-june-2024 :

The IntegrationParameters::normalized_max_penetration_correction has been replaced by ::normalized_max_corrective_velocity to make the parameter more timestep-length independent. It is now set to a non-infinite value to eliminate aggressive "popping effects".

(bevy_rapier 0.27 being the version bumping rapier to 0.20)

As for your fix, if tweaking the parameters isn't enough, another option is to query collisions and and/or the colliders through the query_pipeline and teleport your player manually outside the collision.

@PraxTube
Copy link
Author

PraxTube commented Aug 2, 2024

Thank you very much! This is exactly what I have been looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants