Issue with AI falling through the map using a Character Controller
Whenever I want to make the AI jump, it falls through the map. The components that I am using are the NavMeshAgent for walking on the navigation , the Character Controller for detecting a ground collision on the map, and the Rigidbody for allowing the AI to jump. Here's what I want to happen. If the animation I have calls an event that disables the NavMeshAgent, and allows the Physics.Gravity in the script to take effect on the Rigidbody, then it will be able to jump. The jump speed will be set to say 500 and the variable will keep decreasing until a ground collision is detected. When the ground collision is detected after falling, the NavMeshAgent will immediately turn on to prevent the AI from falling through the map. However, the real issue is the character controller is not detecting the ground, resulting in the AI not being able to turn on the NavMeshAgent and return back to the floor it was supposed to land. If anyone has a solution to this, please help. It would mean a lot.