How to make Character Controller NOT collide with things

I am developing a simple FPS game using C# and I plan on making it multiplayer, and although the game is PvE I want to add a toggle to make Friendly Fire possible. However, the Character Controller Capsule blocks raycasts before the actual hurt box of the player is hit. I tried using IgnoreRaycast layer, but it didn’t work (and I can’t anyway because I already have a “Player” layer for other purposes).

It also collides with things like items on the floor, and since I have a boolean to check if it’s grounded, sitting on top of an item for a while then falling down even 10 cm make the player take huge fall damage (I was able to fix this by going to Edit > Project Settings > Physics and making the two layers not collide).

Is there a way to make so Character Controller collides ONLY with the ground? Or better, make it collide with nothing at all and use another collider inside a child object to check for every collision?

CharacterController is a collider, so it behaves the same way as other colliders in Unity.

As you have explored - the way to do this is by using the layer settings in Physics.

If you want this - why use a CharacterController at all?

6843815--796631--upload_2021-2-16_17-52-59.png
i dont really know but try to disable the the box collider of your pysics obstacles . . . set true with this trigger if you want to check the hit of an object . … disable the trigger of your capsule or fps controller . . or better try to keep to place the raycast a bit more in front of your char . . it seems like the start position has been placed in your controller capsule

Like the name suggests, to simply control the character’s motion.

There are other objects that I want to be able to collide with eachtother, including box colliders I added to the player object itself. The only one I don’t want to collide with others is the character controller.

The only thing I can think of is making the controller geometry as small as possible