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

Physics collision filtering (reopen) #467

Open
2 tasks done
Wackytoaster opened this issue Feb 13, 2025 · 0 comments
Open
2 tasks done

Physics collision filtering (reopen) #467

Wackytoaster opened this issue Feb 13, 2025 · 0 comments

Comments

@Wackytoaster
Copy link

Wackytoaster commented Feb 13, 2025

Reviewed guidelines

  • I have read and understand the suggestion guidelines

Checked for duplicate suggestions

  • I checked for existing similar suggestions

Summary

Please refer to #68 for more info/discussion
Some further info on this: https://www.iforce2d.net/b2dtut/collision-filtering
Box2D docs: https://box2d.org/documentation/group__shape.html#structb2_filter

Long story short, please add collision filtering to the physics plugin. The relevant features in box2D are categoryBits, maskBits and groupIndex

Possible workarounds or alternatives

There are plenty of things that are either extremely tricky if not impossible to work around without this feature. (e.g. jumpthrough platforms, see old feature request)
Or simply platforms that enemies can stand on but the player can't.

Proposed solution

Expose the box2D feature of categoryBits, maskBits and groupIndex

  1. In the object properties
    Image

  2. At runtime (set and get/expressions)
    Image

Why is this idea important?

Many times when I'm using the physics plugin I end up running into a wall with this exact issue. I need A to collide with B, and B with C, but not A with C. It's practically impossible to work around.

Additional remarks

Colludiums plugin is finally starting to die properly (somewhere between r420-r426) and throwing errors/freezing stuff. RIP, because it's not gonna get updated (so with SDKv2 it was dead either way) It was a goated plugin because it had this feature (among others)

Please make 2025 the big physics plugin update (there's other additional feature suggestions for physics out there too)

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

1 participant