I think the title explains itself pretty well. Even though I’m not pressing H, it is still true! I need some help, as I started just a month ago and haven’t been doing much.
using UnityEngine;
public class PlayerCameraController : MonoBehaviour
{
void Start()
{
Camera mycam = GetComponent<Camera>();
}
void Update()
{
Camera mycam = GetComponent<Camera>();
Vector3 target = mycam.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, mycam.nearClipPlane));
transform.LookAt(target, Vector3.up);
if(Input.GetKeyDown(KeyCode.H));
{
Debug.Log ("Yep");
}
}
}