Skip to content

Investigate compound collider and spatial event package interaction #63

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

Closed
reeseschultz opened this issue Feb 4, 2021 · 1 comment
Closed
Assignees
Labels
triage Maintainer needs to verify nature of issue and determine future steps.

Comments

@reeseschultz
Copy link
Owner

reeseschultz commented Feb 4, 2021

If a child entity has a spatial activator and/or trigger (necessitating, ideally, a PhysicsShape for authoring the collider), but the parent also has a collider, then the child's collider is compounding into that of the parent at least in Unity.Physics 0.5.1. This means that, on entry/exit/overlap, the compound entity is reported rather than the specific child entity. For things such as determining a character's visible range, this is not helpful at all.

Now there are multiple workarounds, one of which is to make all colliders siblings. Another is to defer parenting or assignment of the collider. But, in most cases we want to treat the root entity physically with a PhysicsBody or RigidBody. It's used in the simulation in the physical sense, not necessarily as a trigger, although it could serve both purposes. In other words, the workarounds have issues.

It looks like determining the child entity associated with a sub-collider of a compound collider is going to get easier in the release following 6.0.0 according to this forum thread. At one point steveeHavok says "Entity for the Child Collider will be available . . . "

So hopefully that means I can opt for the most specific-colliding entity and improve the spatial events package by defaulting to it.

@reeseschultz reeseschultz added the triage Maintainer needs to verify nature of issue and determine future steps. label Feb 4, 2021
@reeseschultz reeseschultz self-assigned this Feb 4, 2021
@reeseschultz
Copy link
Owner Author

Closing, see #99.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Maintainer needs to verify nature of issue and determine future steps.
Projects
None yet
Development

No branches or pull requests

1 participant