Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

I'm trying to assign a public collider to some trigger events, but i keep getting "'GroundDetector.GroundCollider' is a 'field' but a 'type' was expected." message.

$
0
0
This is what i have so far, but i keep getting the error message "'GroundDetector.GroundCollider' is a 'field' but a 'type' was expected." All i'm trying to do is to set the public Collider to the three trigger events below (OnTriggerEnter, OnTriggerStay, OnTriggerExit) using UnityEngine; using System.Collections; public class GroundDetector : MonoBehaviour { private bool onground; public Collider GroundCollider; void Start() { GroundCollider = GetComponent(); } void OnTriggerEnter(GroundCollider other) { onground = true; } void OnTriggerStay(GroundCollider other) { onground = true; } void OnTriggerExit(GroundCollider other) { onground = false; } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>