Advices about slow collision checking

Howdy everyone !

While trying to spot everything that took to much time in my game loop, I noticed that a specific collision check took, by itself, a tenth of a second.

That is incredibly slow, especially since I wanted to use this to check the field of views of characters (which mean it will be checked a lot of time).

Onto the specifics, I’m using a CollisionSphere, with a CollisionMask matching only other characters (and right now, there are only three of them, so it’s not much).
The CollisionSphere is parented to the NodePath of the character doing the check. And its radius is 50.f : maybe that’s the issue here ? Is it way too big ?

Is there anything I can do to fasten this up ? I’ve used CollisionRay in the same conditions and they’re incredibly faster (too fast even to give an estimation).

Maybe another kind of collision check that would be more appropriated ?

Are you testing against visible geometry? Could you perhaps enable collision visualisation and show a screenshot? This will help us to see what exactly is being included in the collision tests.

Is there a way to enable collision visualization in C++ ?
I only found the CollisionVisualizer in the Python doc.

I can show the nodes of my collision objects like this :
falloutequestriarpg.files.wordpr … shot32.png

But nothing more as far as I know.