I’m obviously an idjut & missing something very basic…
I have a Camera colliding with an invisible Plane to trigger a GUI event
Plane has collider (even a rigid body though I doubt I need)
My Camera also has a Box Collider on it just to make sure
Why won’t my OnCollisionEnter script won’t work?
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
public class triggerGUI : MonoBehaviour {
public GameObject toAppear;
public GameObject toDisappear;
void OnCollisionEnter (Collision camera ) {
Debug.Log ("Collide");
toDisappear.SetActive (true);
toAppear.SetActive (false);
}
}
Thanks Y’all
~be