Search Unity

Ragdolls randomly fall through terrain

Discussion in 'Physics' started by bengladwyn, Jun 4, 2020.

  1. bengladwyn

    bengladwyn

    Joined:
    Apr 11, 2019
    Posts:
    9
    Hi everyone,

    I am using unity 2019.3.14f1 and I am using the nav mesh agent to direct some ragdoll zombies towards the player. The ragdolls have the default rigidbodies attached to them when they were created. They also have an animator attached to make then walk and a floating healthbar above their head.

    I then use a script to spawn these ragdoll zombies on the terrain so that they can chase the player. The navmesh work correctly and directs the zombies towards the player, and the health bar follows the navmesh agent. The zombie also walks correctly but a random selecti on of the zombie ragdolls will fall through the floor so all you see in game is a floating health bar that chases you.

    This seems to occur more often when the zombies spawn behind where the player is looking, note occlusion culling is on and the game is written for the Oculus quest. What could be causing this.

    I attach pictures of the hierarchy in the zombie prefab. Any help is much appreciated.

    Many thanks,
    Ben Zombie Hierachy.PNG