- Home /
[2D] Moving the player 1 tile at a time using rigidbody movement
First off, I am still quite new to this, so please be considerate if I made any idiotic mistakes. Having said that, I am trying to do little a 2D tile based RPG, however, when I started to implement colliders (to restrict the area accessible to the player), I quickly realized that the way I was moving the player around was not going to work (player was able to go through colliders if the respective movement key was being pressed repeatedly). Upon discovering this I did a bit of research and saw that you are supposed to use the physics engine (rigidbody) to move the player around, but I do not know how or if it is possible to restrict movement to one tile at a time (one per buttonpress) like this.
TL;DR Trying to do player movement using the rigidbody (physics engine) but restrict movement to one tile at a time (per buttonpress)
This is the script I am currently using. What would I need to change?
Your answer
Follow this Question
Related Questions
Player movement script for a stickman 1 Answer
2D player keeps getting dragged to the left for some reason. 0 Answers
2D How to make character slowly stop after moving 1 Answer
How do i make a cube move (Continuosly without stopping) when i press a button once in unity 2D 2 Answers
How to make the sprite move a certain amount of pixels when a key is pressed? 1 Answer