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

One-directional collision layer check for rigid bodies and soft bodies #50625

Merged
merged 1 commit into from
Jul 31, 2021

Conversation

pouleyKetchoupp
Copy link
Contributor

Check for each body individually if it collides with the other one or ignores it.

When a body is being ignored, the other body's mass is considered infinite when applying impulses to avoid extra overlapping.

Implements godotengine/godot-proposals#2775 for RigidBody and SoftBody.
Supersedes #49166.

Check for each body individually if it collides with the other one or
ignores it.

When a body is being ignored, the other body's mass is considered
infinite when applying impulses to avoid extra overlapping.
@pouleyKetchoupp pouleyKetchoupp requested a review from a team as a code owner July 20, 2021 00:28
@pouleyKetchoupp
Copy link
Contributor Author

Just pushed a couple changes:

@Calinou
Copy link
Member

Calinou commented Jul 20, 2021

I was thinking about whether we should expose this as an opt-in project setting for 3.x. Since 3.x will remain around for a while after 4.0 is released, I think we should offer backwards-incompatible features optionally when it doesn't require too much effort.

I guess it mainly depends on how much demand there is to have this feature in 3.x. It would make porting projects to 4.x easier if you opt into the feature in 3.x.

@pouleyKetchoupp
Copy link
Contributor Author

@Calinou That sounds like a good idea!

It should be relatively easy to do for 2D.

It would require a bit more work for 3D as we would have to make it fully compatible with Bullet as well. It's not the case for rigid body vs. rigid body collision. It should be possible, but hopefully it's not too complicated.

@reduz
Copy link
Member

reduz commented Jul 31, 2021

looks great!

@akien-mga akien-mga merged commit 6acbcf7 into godotengine:master Jul 31, 2021
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

4 participants