I have a cube with the mesh filter set to plane and rotated 90* on the x-axis and 180* on the y-axis. I set the freeze rotation on the x,y,z-axis and freeze location on the z-axis. I made this very simple movement script.
using UnityEngine;
using System.Collections;
public class Player : MonoBehaviour
{
public float speed;
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0, moveVertical);
rigidbody.AddForce(movement * speed * Time.deltaTime);
}
}
I want to improve it (A lot) and I want to understand all the lines but the main problem is the turning speed you cannot turn quickly it feels like he is walking on ice and I want it faster like in Mario. In advance thanks for any help.