How do i stop rigidbody2D bounce

So im quite new to unity and ive decided to start working on a 2d rpg, using sources from this site ive manged to get a code that gives me grid movement much like that in the older pokemon games. Now i want to introduce collisions and physics to my game but after attaching the rigidbody component and moving around i realise my movement has become very clumsy and well - not nice - to look at. But the real problem is that when ever i walk into an object with a collider - say a tree or something like that - instead of simply refusing to go further it bumbs into the object gets pushed back and repeats and i get stuck in this state. heres my player controller script, i’d appreciate any pointers tips or an entire resolution to my problem THANKS :smiley:

public class AnnaController : MonoBehaviour {

	private Rigidbody2D rgdbdy;
	public Animator anmtr;
	private static bool playerExists;
	private float mSpeed;
	public bool overworld;
	public Vector2 forwardVector;
	public Vector2 mvmntVector;
	private Vector3 pos;
	private bool hasStepped;
	private bool isWalking;
	private bool Up;
	private bool Down;
	private bool Left;
	private bool Right;


	// Use this for initialization
	void Start () {
		anmtr = GetComponent<Animator> ();
		rgdbdy = GetComponent<Rigidbody2D> ();
		mSpeed = 0.75f;
		pos = transform.position;
		forwardVector = Vector2.zero;
		if (overworld) {
			if (!playerExists) {
				playerExists = true;
				DontDestroyOnLoad (transform.gameObject);

			} else { 
				Destroy (gameObject);
			} 

		}
	}
	
	// Update is called once per frame
	void FixedUpdate () {
		anmtr.SetFloat ("ForwardX", forwardVector.x);
		anmtr.SetFloat ("ForwardY", forwardVector.y);
		Right = false;
		Left = false;
		Down = false;
		Up = false;
		if (Input.GetKey (KeyCode.B)) {
			mSpeed = 1.25f;
		}
		else {
			mSpeed = 0.5f;
		}

		if (!Right) {
			if (Input.GetAxisRaw ("Horizontal") > 0.5f && transform.position == pos) {
				pos += (Vector3.right * 0.32f);
				forwardVector = Vector2.right;
				
			}
		}

		if (!Up) {
			if (Input.GetAxisRaw ("Vertical") > 0.5f && transform.position == pos) {
				pos += (Vector3.up * 0.32f);
				forwardVector = Vector2.up;
				
			}
		}

		if (!Left) {
			if (Input.GetAxisRaw ("Horizontal") < -0.5f && transform.position == pos) {
				pos += new Vector3(-0.32f, 0, 0);
				forwardVector = Vector2.left;
				
			}
		}
		if (!Down) {
			if (Input.GetAxisRaw ("Vertical") < -0.5f && transform.position == pos) {
				pos += new Vector3(0, -0.32f, 0);
				forwardVector = Vector2.down;
				
			}
		}
		transform.position = Vector2.MoveTowards (transform.position, pos, Time.deltaTime * mSpeed);
		}
}

For a classic, snappy, 2D feel, you probably don’t want to use the built-in, realistic physics.

If the objects your player will be colliding against do not move, you can make them all static colliders (objects that only have a collider component, and not a rigidbody) and then move the player using Rigidbody2D.MovePosition in Update.

If you’ve got other moving colliders, you’ll have to set the isKinematic flag on their Rigidbody2D components (the player object included) and write your own collision checking.

This involves using the Physics2D overlap or raycast functions before you move the player to a new position to test against any colliders at the new position; You then only move the player to the position if the player’s collider will fit.

See Unity - Manual: Introduction to collision for more info on isKinematic and colliders/physics.