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-pyun9 years ago

@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.

Stephan9 years ago

@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.

pyun-pyun9 years ago

@Stephan Linear drag helped! I'll post another pic tomorrow when I can get her to jump, etc. Thanks again!

pyun-pyun9 years ago

@Stephan Ah, I am using RigidBody2D (I should have made that clear!). I'll try that. By the way, I don't know if this is a silly question, but is it possible to move the character without it? Thanks for helping out!

pyun-pyun9 years ago

@tim Ooh, thanks! I'll definitely look into that, and I'll update with whatever I find.

Stephan9 years ago

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

tim9 years ago

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.

Daily Art Club

Make art every day, how long can you last?

joined 3,611 days ago

2024-12
2024-11
2024-10
2024-09
2024-08

Make games.

Work on some aspect of a game, let's say 5 days a week.

daily from 2015-01-25 to 2016-01-25