Skip to content

Add ColliderDisabled #584

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

Merged
merged 2 commits into from
Dec 9, 2024
Merged

Add ColliderDisabled #584

merged 2 commits into from
Dec 9, 2024

Conversation

Jondolf
Copy link
Owner

@Jondolf Jondolf commented Dec 9, 2024

Objective

Closes #436.
Follow-up to #536.

Avian already supports disabling rigid bodies (#536) and joints (#519). The missing piece is disabling colliders!

Solution

Add a ColliderDisabled component for temporarily disabling collision detection for colliders and removing them from spatial queries.

For now, I decided not to prevent disabled colliders from contributing to mass properties of rigid bodies, since the primary purpose of the component is to temporarily disable collision detection, and I think it would be unexpected if it affected the behavior of the rigid body in any other way.

@Jondolf Jondolf added C-Enhancement New feature or request A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality labels Dec 9, 2024
@Jondolf Jondolf added this to the 0.2 milestone Dec 9, 2024
@Jondolf Jondolf enabled auto-merge (squash) December 9, 2024 01:23
@Jondolf Jondolf merged commit 5eb5722 into main Dec 9, 2024
5 checks passed
@Jondolf Jondolf deleted the collider-disabling branch December 9, 2024 01:40
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-Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RigidBodyDisabled and ColliderDisabled
1 participant