Assets/Scripts/PlayerController.cs(17,83): error CS1502: The best overloaded method match for UnityEngine.Vector3.Vector3(float, float, float)’ has some invalid arguments
Assets/Scripts/PlayerController.cs(17,83): error CS1503: Argument #2’ cannot convert double’ expression to type `float’
I am trying to do the roll a ball but i keep getting this compiling error
How do i fix this
using UnityEngine;
using System.Collections;
public class PlayerCon: MonoBehaviour {
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Vector3 movement = new Vector3 (moveHorizontal , 0.0f, moveVertical );
rb.AddForce (movement);
}
}