I don’t know what the error mean. It says Camera does not contain a definition for ‘main’. Can someone help me figure this out?
using UnityEngine;
using System.Collections;
public class ReticleMovement : MonoBehaviour
{
void Update ()
{
Ray ray = Camera.Cam.ScreenPointToRay(Input.mousePosition);
RaycastHit[] hits;
hits = Physics.RaycastAll(ray);
foreach(RaycastHit h in hits)
{
if(h.collider.name == "ground")
transform.position = new Vector3(h.point.x, 5f, h.point.z);
}
}
}