Basically, I want my player move distance to be equal both on X and -X axis. I can’t do it because when I’m on a slope, either X or -X is faster. I hope I’m getting across my point here.
@Aldo , thanks for the reply. But I think it’s not the best solution for this. What if the next terrain level has different slopes. It will cause some major issues I guess. I just want to remove the “friction” of the player off the terrain so it won’t slip down slopes.
oh think that the transform.right is the same vector as the red arrow on your image, so if the Y inside the vector is negative it means you are going down.
Also it will depend on your players angle instead of global direction.
You don’t have to use it for movement, you can use it only to know if you are going down the hill or up the hill.
If this isn’t helping at all I didn’t understand the problem correctly.
Basically, I just don’t want my players to slip down hills once it stopped from moving X or -X. (caused by Rigidbody2D)
Lastly, whatever slopes the player moves onto (high or low slopes) I want the same “speed” (again, caused by Rigidbody2D, where its hard to go up and easy to go down due to gravity)
It sounds to me that you might need to work with AddForce instead of giving it an actual velocity if you want the same “push” on bot ways, but it will feel weird on the start since it will have to accelerate slowly, in games that look like your image but with cars/bikes they tend to use wheel colliders and wheel friction so the speed comes from actual physics.
I will get some rest and will read everything again tomorrow (I am a bit tired).