An error keeps on popping up. The error is: CS0839 and it says that an argument is missing but I don’t know what that is.
using UnityEngine;
using System.Collections;
public class playercontrols : MonoBehaviour
{
void fixedUpdate ()
{
float h = horizontalSpeed * Input.GetAxis("Mouse X");
float v = verticalSpeed * Input.GetAxis("Mouse Y");
Vector3 movement = Vector3(horizontalSpeed, 0.0f, verticalSpeed,);
rigidbody.AddForce(movement);
}
}
You have an extra comma on line 11 which would be you specifying that there is another parameter to the Vector3.
Vector3 movement = Vector3(horizontalSpeed, 0.0f, verticalSpeed,);
should be:
Vector3 movement = new Vector3(horizontalSpeed, 0.0f, verticalSpeed);