using System.Collections; using System.Collections.Generic; using UnityEngine; public class FallCheck : MonoBehaviour { public float groundDistance = 0.2f; public LayerMask groundLayer; public Transform groundCheckTransform; public bool isFallen; private void Start() { //groundCheckTransform = GameObject.Find("fallcheck").transform; } private void Update() { //isFallen = Physics.CheckSphere(groundCheckTransform.position, groundDistance, groundLayer, QueryTriggerInteraction.Ignore); } public bool IsFallen() { return isFallen; } }