Hello
I have NPCs that walk around everywhere but when there is a staircase or a slope, they do not stay in a vertical position but are oriented according to the slope and it is not very realistic.
I tried to modify the control points without success. I use the new spline system of unity and the animations come from Mixamo.
How is that happening?
If it is code doing it, such as normal-tracking code, disable that code.
If it is physics, perhaps lock the X and Z rotational axes on the Rigidbody.
If you don’t understand how it is happening, fix that first and find out why.
Otherwise… sounds like some kind of bug, so all the usual debugging steps apply.
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.