hello, i’m new to unity and i’m trying my best to get things work fine. after watching some tutorials i ended up having this code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class cmovement : MonoBehaviour {
public KeyCode PressUp;
public KeyCode PressDown;
public KeyCode PressLeft;
public KeyCode PressRight;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown (PressUp))
transform.Rotate(Vector3.right, Time.deltaTime);
}
}
so i assigned the W key to the variable PressUp, aaaaand it doesn’t work. i wonder why