Support Forum

Player falling through the ground

I just installed a free version and I am trying your examples. When I start the player (Agent) is falling through the ground and keep falling? Please advise

Unity version : 2019.2.12

Hi

This might be the case if you have disabled collisions between some layers in your project. Check Project Settings -> Physics.

Here is my settings. I am not sure which layer I am looking

Hi

You need to make sure that the layer the agent is on has collision with the layer the ground is on. You seem to have renamed a lot of layers so I would suggest that you look in the example scene to see what the names are for the agent and the ground.

My agents are set to collide with the terrain, yet they occasionally fall through it. After they spawn, they will follow the path for several seconds and sometimes one will fall through. As I increase Time.timeScale, they begin falling through the ground more often and sooner after spawning. As I approach an 8x speed increase, they fall through almost every single time :frowning:

I’m using AIPath with a grid navmesh.

I tried disabling gravity on the AIPath script, which does keep the agents from falling into oblivion, but my grid navmesh has slopes and inclines, so without gravity the agents to ignore the terrain and always walk at the height they were spawned at. I also tried checking “Constrain Inside Graph”, but that didn’t keep the agents on the graph.

The good news is that adding a rigidbody fixes the problem. The bad news is that a rigidbody drastically reduces frame rates to a crawl.

Using a RVO controller they all fall through the ground after a second or two without a rigidbody with Time.timeScale set to 1.