Need help with Player Movement

Hey guys,

I am very new to Unity and am just learning. For my class I need to create a 2D game and I’m already stuck as I am not good with coding at all. I have no idea how to go about coding my movement script for my 2D sprite nor do I know how to code it to pick up the objects I have set around on my game. I have gone over the Roll a Ball tutorial again but since it is in 3D it doesn’t really help me…Would anyone be able to help and explain to me how to get these going? I know somewhere along the line I need to use input.get button but I have no idea how to do so nor do I know what most of the code means. It all has to be in C#

I need to use Input.GetAxis to move horizontally and vertically. However, when I go to do so, the character will not move (but it says it is). It just falls out of my plane

I highly suggest watching some tutorials such as:

The below script should work for you.

using UnityEngine;
using System.Collections;

public class CharacterMovement : MonoBehaviour {
	// Use this for initialization
	void Start () {
	// Update is called once per frame
	void Update () {
		float input_x = Input.GetAxisRaw("Horizontal");
		float input_y = Input.GetAxisRaw("Vertical");
		bool isWalking = (Mathf.Abs(input_x) + Mathf.Abs(input_y)) > 0;


			transform.position += new Vector3(input_x, input_y, 0).normalized * Time.deltaTime;