Hello Unity Forum Community,
I am working on Unity2021.3.1f1 and I want to use Physic Debugger to help visualize the physic collision in my scene and my character. But the outline of character controller seems not fit with the real shape.
There are the character controller and the capsule collider with the same parameters. But the character controller outline seems less than the other ( I hide the mesh render of the capsule to make it more clear). This difference makes me not able to visualize the collision between character controller with the scene. Is there anyone can explain this for me ?
Thank you all for your time and support.
Your issue is that these are the different size? The other one is scaled Vector3.one. What is the scale of the other one? Also, based on the picture it cant be seen if the other one’s just further away, place them both in origo on top of one another and see then.
Thank you for your reply! There are the specific parameters of the character controller capsule and the capsule collider .I am sure that they are in the same scale and the same height and radius. And when I put them in the same position, it is more clear that the outlines of physics debugger drawing don’t fit.
In the following screeenshot, the two gameobjects are put in the same position and the only difference is that I toggle the "Show Trigger ". ( I toggle the capsule collider as a trigger )
I just tested this, created a CharacterController and a Capsule, and placed them on top of another. The’re exactly the same size. See picture.
Yes, I can also see the same in the scene. The size of the collider previewed in the Scene is the same as that of the character controller. However, when I opened the Physic Debugger window to see the global coloring performance, the character controller drew different shapes in this mode than the capsule collider. The difference happened when I toggle “Collision Geometry” in Physic Debugger.
Looked into it for curiosity.
Looks like Unity CharacterController is actually NVidia/PhysX code. The PhysX documentation says:
“The CCT library creates a kinematic actor under the hood, for each controlled character”
When you open Physics debugger, this blue capsule is a Kinematic Rigidbody. I bet this body is the hidden internal kinematic actor that comes from PhysX, because it’s there even if your gameobject has no Rigidbody component. So the debugger reads this from PhysX.
This rigidbody is not a collider and won’t collide with anything. It’s just a hidden element of CharacterController that pops up in the debugger.
So it means I can’t use the Physics Debugger Window to show whether my character controller has correctly collided with the scene ? Maybe I can use another capsule collider to show this. Thank you for all your replies!
No, it means that you can ignore the blue capsule because it’s not a collider.