Making my object move foward the same speed as up hill and down hill slope???
So basically I have my object moving forward on the ground the problem is that when it hits an uphill slope it takes longer to climb hill and downhill goes faster just like in the real life. Im trying to keep the speed all the same as if it was on a flat surface.
The code that I use to get my object to move forward is
rb2D.velocity = transform.right * 5 * Time.deltaTime;
so I tried this code instead
rb2D.velocity = (transform.right * 5 * Time.deltaTime).normalized;
which doesn't seem to be any different than the first one. I don't get any errors when running either. Can anyone help me with this problem. Thanks again.
Your answer
![](https://koobas.hobune.stream/wayback/20220612221614im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to access the coordinate x y after normalized it by another variable? 0 Answers
3d space heading/volocity direction prediction and mp/s hud,code? 1 Answer
why is the rigidbody's velocity zero in OnCollisionEnter2D? 1 Answer
What are the parameters passed in vector2? 0 Answers
Vertical Velocity for fps 0 Answers