using UnityEngine;
using System.Collections;

public class mv : MonoBehaviour {
    public float speed = 4;
    public float mouseSenX = 2;
    // Use this for initialization
    Rigidbody rb;
    void Start () {
        rb = GetComponent<Rigidbody>();

	}

    // Update is called once per frame
    
    public void UpdateSt () {
        float x = Input.GetAxis("Horizontal") * speed ;
        float z = Input.GetAxis("Vertical") * speed;
        float r = Input.GetAxis("Mouse X")*mouseSenX;
        rb.velocity = transform.TransformVector(x, 0, z);
        transform.Rotate(0, r, 0);
       
    }

}
