using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
public float speed;
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
GetComponent<Rigidbody.AddForce> (movement * speed * time.deltaTime);
}
}
Can anyone help why I am getting the error CS0426 with the line?
I don’t know C# very well, so any help would be appreciated!