I have looked for about 6 hours now and haven’t found an answer to what I thought would be very simple. All I want to do is make it so that my character quits sliding off of anything not flat. He can walk up slopes that are slightly tilted but anything else is not walkable. I have looked at tutorials, looked at forums, videos, nothing has given me this answer.
Now, even though nothing has worked for me yet, from what I have found, it seems as if I will require a ray cast for this. I have tried using a ray cast to get the normal of the slope, but I don’t know how to turn that into a direction that can be applied to the character’s velocity, but I don’t know how to do that. Because wouldn’t I need to adjust the velocity to make the character’s movement match the rise of the slope?
So thanks in advance, any help is greatly appreciated. I am using C# and the latest version of Unity.