Why is the Y axis set to -10? If you want to make the character move forward than the X position (the top one) needs to be set to one and everything else needs to be set to 0. Correct me if I'm wrong please.
Characters typically have a forward vector. You don't just assume or move X or Y as many factors (mesh rotation) can cause these to not be what you want directionally
You should move the character in the direction of the forward vector (1 to go forward, -1 to go reverse) and the right vector (1 to go right, -1 to go left).
Try moving the rigidbody in incrments rather than applying a force to it, that helped me when I got stuck with character movement. Though you'd have to use a different function to not only sense if the right button is pushed but also when it's NOT being pushed.
9 comments
Nowhere near enough context to help you.
What is ‘This’? Line 18
Edit: to be clear, the other replies about velocity/force might also be right but that’s what stuck out to me.
^^^ This. ^^^
I would try to override the applyForce method and use linearVelocity instead.
Why is the Y axis set to -10? If you want to make the character move forward than the X position (the top one) needs to be set to one and everything else needs to be set to 0. Correct me if I'm wrong please.
Characters typically have a forward vector. You don't just assume or move X or Y as many factors (mesh rotation) can cause these to not be what you want directionally
You should move the character in the direction of the forward vector (1 to go forward, -1 to go reverse) and the right vector (1 to go right, -1 to go left).
add more force
C.h.a.t.G.P.T.
Try moving the rigidbody in incrments rather than applying a force to it, that helped me when I got stuck with character movement. Though you'd have to use a different function to not only sense if the right button is pushed but also when it's NOT being pushed.
I think this is the one; Input.GetKeyDown