- Home /
Stick player (my own rigidbody controller) to the ground when going down the slope
I am making my own controller on rigidbody and here it happens to me like in the picture on the left, but I would like as I drew on the right.
That is, I want to glue the player to the slope after a flat surface. I have already googled a lot and tried it myself. but I could not figure out how this could be done. Can someone help with this?
P.S. I don’t want to change the gravity of the player and I definitely don’t want to tag sloped surfaces
Answer by Faurazeko · Aug 16, 2021 at 04:32 PM
By the way, this is especially evident (the fact that the player does not stick to the slope) when you run at great speed and run out onto the slope. Then you will never touch it at all, you just fly away.
Answer by Jroel · Dec 23, 2021 at 08:28 PM
I have been to this thread 3 times and there's no answer, so I don't mean to necro-post, but just incase anyone else was looking for a solution, this is one of the most solid I've come across.
https://catlikecoding.com/unity/tutorials/movement/surface-contact/
Check out his other tutorials too.
Your answer
Follow this Question
Related Questions
A simple solution for constant rigidbody movement without changing and clamping velocity directly 2 Answers
Which way of achieving player control is better - rigidbody functions or transform functions? 0 Answers
Rigidbody bumping when going down slopes 3 Answers
Question about configuration of physics 3D materials 0 Answers
Move Character Controller 0 Answers