Hi, I’m new to unity and I was trying to make a sprite go right but it’s not working. There is an image of the console errors. Does anybody know what I’m doing wrong?
using UnityEngine;
using System.Collections;
public class V_Move : MonoBehaviour {
public gravity;
public moveSpeed;
prviate bool moveSpeed = false;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(Input.GetKeyDown(KeyCode.RightArrow)) {
moveRight = true;
}
}
void FixedUpdate () {
velocity += gravity * Time.deltaTime;
velocity = Vector3.ClampMagnitude(velocity, moveSpeed);
transform.position += velocity * Time.deltaTime;
}
}
