Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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