hello guys, i know only this script for movement ,now my player go left and right and this is not okay because player moves slowly like a ball , and i want that he moves fastly from left to right . can you modify the script?:
using UnityEngine;
using System.Collections;
public class basicmovementunity : MonoBehaviour {
public float speed;
private Rigidbody2D rb2d;
void Start()
{
rb2d = GetComponent<Rigidbody2D> ();
}
void FixedUpdate()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector2 movement = new Vector2 (moveHorizontal, moveVertical);
rb2d.AddForce (movement * speed);
}
}