Hi again i am asking for some help i have a ton of errors!
ERRORS:
-
error CS0103: The name `movementspeed’ does not exist in the current context
-
error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
3.error CS0103: The name `movementspeed’ does not exist in the current context
4.error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
CODE:
using UnityEngine;
using System.Collections;
public class FirstPersonController : MonoBehaviour {
public float movementSpeed = 5.0f;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
float rotLeftRight = Input.GetAxis ("Mouse X");
transform.Rotate(0, rotLeftRight, 0);
float forwardspeed = Input.GetAxis ("Vertical") = movementspeed;
float sideSpeed = Input.GetAxis ("Horizontal") = movementspeed;
Vector3 speed = new Vector3 ( sideSpeed, 0, forwardspeed );
CharacterController cc = GetComponent<CharacterController> ();
cc.SimpleMove( speed );
}
}