Skip to content

Conversation

@Ughuuu
Copy link
Owner

@Ughuuu Ughuuu commented Jul 20, 2024

@ThierryBerger
Copy link

It's a change we can consider for rapier, an example showcasing the kind of new setup this PR enables would help with upstreaming it 🤩

Also, extra care should be taken to avoid breaking a previously possible setup, which is difficult to assess here. a "migration guide" will probably be welcome.

To clarify, I'm not requesting these (hey it's your fork, thanks for making this in the open 😄), I'm voicing my interest and discussing a possible path forward for rapier 👍.

@Ughuuu
Copy link
Owner Author

Ughuuu commented Jul 26, 2024

Thanks for comments. The main problem currently with godot-rapier is in order to integrate into godot physics it needs to work in same way.

Friction and bounce works differently in rapier vanilla, this just makes it work same way as in godot. I could show examples or reference how it works in godot, but not sure if rapier would want to change its behaviours because godot does something in a specific way.

Layers and masks also work differently in godot. Collisions happen with an or instead of and, but it's a bit more complicated also. Godot also has asymetrical collisions. Meaning if A has layer 1 but no mask and B has layer 1 and mask 1, B will collide with A but A will not collide with B. https://docs.godotengine.org/en/stable/tutorials/physics/physics_introduction.html#collision-layers-and-masks

  • Now, on this, however could we implement this? Idk, godot jolt what does is it gives object A infinite mass and inertia in the collision so it seems like it doesnt interact.

Probably right now godot rapier is not big enough to say something like: this is how it works, deal with it. People aren't going to change their project in godot to work with different way godot rapier works. So for now at least, having some local changes might be expected, again unless rapier is willing to add them to rapier vanilla.

@ThierryBerger
Copy link

ThierryBerger commented Aug 9, 2024

@Ughuuu
Copy link
Owner Author

Ughuuu commented Aug 9, 2024

Perfect, if that gets in I can remove some parts of this.

Update mesh_converter.rs

Update collider.rs

Update physics_pipeline.rs

Update physics_pipeline.rs

temporary build fix

add custom friction rules needed for godot symetry
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

Successfully merging this pull request may close these issues.

3 participants