whats wrong with this code? im doing teh roll a ball game project
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
void Update () {
}
void FixedUpdate () {
float moveHorizontal = Input.GetAxis (“Horizontal”);
float moveVertial = Input.GetAxis (“Vertical”);
Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
rigidbody.AddForce (Vector3);
}
heres teh compiler errors:
Assets/Scripts/NewBehaviourScript.cs(11,70): error CS0103: The name `moveVertical’ does not exist in the current context
Assets/Scripts/NewBehaviourScript.cs(11,83): error CS1502: The best overloaded method match for `UnityEngine.Vector3.Vector3(float, float, float)’ has some invalid arguments
Assets/Scripts/NewBehaviourScript.cs(11,83): error CS1503: Argument #3' cannot convert
object’ expression to type `float’
Assets/Scripts/NewBehaviourScript.cs(13,37): error CS0119: Expression denotes a type', where a
variable’, value' or
method group’ was expected
Assets/Scripts/NewBehaviourScript.cs(13,27): error CS1502: The best overloaded method match for `UnityEngine.Rigidbody.AddForce(UnityEngine.Vector3)’ has some invalid arguments
Assets/Scripts/NewBehaviourScript.cs(13,27): error CS1503: Argument #1' cannot convert
object’ expression to type `UnityEngine.Vector3’