Search Unity

Physics.IgnoreCollision what does it actually do and can it help with cpu usage?

Discussion in 'Physics' started by FuzzyShan, Aug 9, 2017.

  1. FuzzyShan

    FuzzyShan

    Joined:
    Jul 30, 2012
    Posts:
    182
    I know PhysX has some what a zone occlusion system where colliders that's further away will not compute against other static/kinematic colliders which will result in much less cpu usage.

    I assuming the worst case here we have 100 rigidbodies, so worst case is that PhysX would have to calculate all 100 rigidbodies against eachother's collision so that's 100^2 calculations. So If I use Physics.IgnoreCollision for each of the 10 rigidbodies(10 *10 * 10 calculations), would the calculations for that come down internally in Physics Engine?

    Regards
     
  2. FuzzyShan

    FuzzyShan

    Joined:
    Jul 30, 2012
    Posts:
    182