I’m using Survivalist character pack by Slayver in my game and their feet are touching the ground. However when I test the game, half of their body falls into the ground when spawning in enemies (fake players). How can I fix this?
By debugging! First thing to do is cause the problem, then press PAUSE in Unity.
Now go figure out what is happening by looking at your sunken enemy in the Scene window.
- the player’s collider is too small?
- the ground’s collider is too low?
- the player is offset from its collider?
- something else
No sense guessing, find out! Then you can make an informed decision about fixing it.
By debugging you can find out exactly what your program is doing so you can fix it.
Use the above techniques to get the information you need in order to reason about what the problem is.
You can also use Debug.Log(...); statements to find out if any of your code is even running. Don’t assume it is.
Once you understand what the problem is, you may begin to reason about a solution to the problem.
Remember with Unity the code is only a tiny fraction of the problem space. Everything asset- and scene- wise must also be set up correctly to match the associated code and its assumptions.
It has something to do with the rig, but I’m not sure how to fix it.
Nevermind, I have just found out that it was the Animator Controller.