Streak Club is a place for hosting and participating in creative streaks.
This is my first Unity game, and the player can now run left and right, but it looks like ice skating. Googling how to get her to start and stop without the slide, but tips would be cool of you! (人 •͈ᴗ•͈)
EDIT: I increased the Player's linear drag to 1.5 and her speed to 5. This significantly reduced the sliding. Curtesy of @talecrafter.
@pyun-pyun There are multiple possibilities for implementing movement/jumping. You could change Transform positions directly without haven a rigidbody, you could have a kinematic rigidbody and move him directly while still having the "trigger" functionality, or you use the 2d physics like now. I can't recommend what's best as it depends on the game and I am undecided myself. If you want a platformer with tight controls, programming your own movement would probably be best. I often use the physics because of pushing other characters around and sliding along obstacles.
Two things that come to mind and could be your problem:
1. Input: Set the Gravity and Sensivity of the Horizontal Axis higher or use Input.GetAxisRaw
2. Physics: If you are using for example a RigidBody2D, increase LinearDrag
I don't know anything about Unity in particular, but it looks like what you want is to increase acceleration and deceleration. This way the player speeds up and slows down quicker, and doesn't slide around so much. The maximum speed should stay the same, only be reached faster.
joined 3,581 days ago
daily from
@Stephan Thanks for the in-depth response! In this case, I think it's best I went with Rigidbody2D, but I might try something different next time.