Sphere collider going through character controller. Please help.

Hi everyone

I am making a game in which a sphere with a sphere collider is moving towards the character which has a character controller component added to it. The character is in mid air and has a script which uses the function OnControllerColliderHit and is meant to change scenes when the sphere hits the character. If the character is moving when the sphere hits it this works perfectly. When the character is stationery, however, the sphere goes right through it.

Any help would be greatly appreciated.


Hi everyone

Thanks for the replies. I’m 16 and only just got Unity recently so it’s all a steep learning curve for me. I think, thanks to your help, that I’ve managed to fix it. I took the character controller off entirely and added a rigidbody to the character and unchecked gravity. Instead of using the OnControllerHit function I now use the OnCollisionStay function. I also added a kinematic rigidbody to the sphere with no gravity and that seems to have done the trick.

Thanks :slight_smile: