0

If I make a compound collider out of 20 sphere colliders, and I know that none of the spheres are going to move relative to eachother (i.e. the parent is going to be doing all of the moving), does Unity still keep track of all of their positions relative to eachother? Or does it take shortcuts to say "Stop doing computations between these 20 colliders because they are gonna stay still relative to one another. Just focus on other objects that come near them". Is there a way to make it stop doing that?

user430481
  • 315
  • 1
  • 4
  • 14
  • I don't know about unity specifically, but most physics engines use an algorithm like this one https://en.wikipedia.org/wiki/Sweep_and_prune – Leo Bartkus Jan 20 '19 at 07:56
  • I might bw wrong but isn't that what the compound is for ... why do you think / how do you know that there are calculations between those colliders? – derHugo Jan 21 '19 at 08:29
  • 1
    I ran some tests where I generated different numbers of sphere colliders under a parent with a single rigidbody (so a compound collider) and recorded the FPS while it moved in the x, y, and z directions. I saw performance drop off drastically after like 350 colliders. There were no other rigidbodies in the scene, so I figured that the only physics calculations being done to affect performance like that were between all of the spheres in the compound collider. – user430481 Jan 21 '19 at 18:16

0 Answers0