I have this code attached to my character (FPS character controller):
void OnCollisionEnter(Collision c) {
print("hello");
}
I’ve attached a RigidBody to both the character controller and a cube in my level. However the code is never triggered when I’m touching or standing on the cube.
I believe that you would only need a RigidBody on one. Try that.
You may want to use OnControllerColliderHit instead. I believe CharacterControllers don’t really work like other physics objects; I’m not entirely sure if they can be used as such. See this page: unitygems.com
I believe that you would only need a RigidBody on one. Try that.
– mkjrfanThe answer you've accepted below is incorrect...
– Lyje