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

Remove collisions between box colliders and sphere colliders #202

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

SebastianHolm
Copy link
Collaborator

This PR addresses the issue I posted while experimenting with layer collision matrix. I found that all the animals box colliders react to all sphere colliders. This was the majority of all collisions that occurred which seemed inefficient since they then had to go through all tag checks.

This PR adds another object to each animal with the purpose of being the trigger for the sphere collider. The box collider could then be unchecked as a trigger in the matrix for the sphere colliders making it only react to things of interest.

Unfortunately to make this work the new game object needed a new collider and rigidbody, making the total collider count of each animal go up to 3. I was hesitant to make this PR push but I guess you guys can help me decide if this PR is necessary.

#196

@SebastianHolm SebastianHolm added the performance Related to the performance of the simulation label Apr 29, 2021
Copy link
Collaborator

@karloq karloq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be working fine!

@SebastianHolm SebastianHolm added low-priority This issue will not be prioritised waiting This is waiting on another issue labels May 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-priority This issue will not be prioritised performance Related to the performance of the simulation waiting This is waiting on another issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove box colliders colliding with sphere colliders on animals
2 participants