Performance issue: If you create a game object, and attach a character controller. If you then create a child, object and add a collider and then instantiate roughly 150 such game objects. My FPS will drop from 72 to about 29.
On the other hand, if you add the character controller but attach it to another child object my FPS would only drop to about 65.
Basically attaching a character controller to the root object and then attaching a collider to a child will cause a massive performance penalty. Adding a character controller without a collider will not cause this problem.
This is on Windows
I may try to roll my own character controller to try to get better performance. But would rather not have to… Rigidbody’s do not have this problem. But thought I would report the issue. I also submitted a bug report.
I am think of putting my hit boxs into a separate game object and maintain a reference on instantiation. This is a very annoying problem :x It makes any game with separate damages zones harder than it needs to be. Does anyone know if is this is a PHYSX limitation.
Sure you disabled collisions between the controller object and all childs etc so you don’t get in-object collisions?
All the children are set as triggers. It does not happen if I replace the character controller with ridge body.
Even if I just attach one child to a game object with a character controller and move the child with the collider far away from the root object it is still a problem. This is without any scripts attached what so ever.
In that case the character controller potentially has assumptions.
As it is capsule collider + rigidbody + xxxx, its hard to impossible to say what it actually does and what might causing this so your best bet is to use rigidbody + capsule collider + own controller script