I Googled and read numerous comments about colliders during runtime and their effects on performance. However I can’t seem to find a solid answer to my question.
Unity defines a Static Collider as;
The question is “Should Static Colliders also have a Rigidbody attached for performance reasons?”.
I know that before Unity 5 Rigidbodies were required on all Static Colliders to prevent PhysX from recalculating the batched colliders.
Then in Unity 5 there was discussion of that no longer being the case; that in Unity 5 the Static Collider no longer required a Rigidbody, (for performance).
When looking at the documents for Collider (Unity 2017.1) it states
“If the object with the Collider needs to be moved during gameplay then you should also attach a Rigidbody component to the object. The Rigidbody can be set to be kinematic if you don’t want the object to have physical interaction with other objects.”
However in Mike Geig’s MerryFragmas 3.0 videos he states that the Rigidbody was a “remnant” – (6 minutes 32 seconds); making the Player Controller a Static Collider.
As I understand the Character_Controller component, it is a child of the Capsule Collider class, but I could be wrong on that.
Additionally Mike Geig added a second Collider to the Player Prefab in his training video.
Mike Geig’s comment is confirmed in the High Performance Physics in Unity 5 article;
“In Unity 5, we’ll use the same data structure to handle the movement of both dynamic and static colliders. Unfortunately, we’ll lose the benefit of Static Colliders consuming less memory than dynamic ones. However, right now, the cost associated with moving Static Colliders is one of the top 3 causes of performance issues in Unity games. We wanted to change that.”
So to set the record straight; will Colliders that are missing a Rigidbody component suffer from performance loss in Unity5 & Unity 2017?
“To Rigidbody or not to Rigidbody a Character Controller Component, that is my question.”
Thanks!