the error says vector3.forward can not be assigned to (it is read only)
this is my script
using UnityEngine;
using System.Collections;
public class basicmove : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.Translate (Vector3.forward = Input.GetAxis ("Vertical") * Time.deltaTime);
}
using UnityEngine;
using System.Collections;
public class basicmove : MonoBehaviour
{
public float MoveSpeed = 10;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
float MoveForward = Input.GetAxis("Vertical") * MoveSpeed * Time.deltaTime;
transform.Translate(Vector3.forward * MoveForward);
}
}
You should not assign any value to Vector3.forward which is the cause for the error you getting. @tanoshimi is also correct.