Unity - Checking if the player is grounded not working

前端 未结 2 1651
我寻月下人不归
我寻月下人不归 2020-11-27 22:28

I want the player to jump when the player is grounded.

private void OnTriggerStay(Collider other)
{
    if(other.gameObject.layer == 8)
    {
        isGroun         


        
2条回答
  •  我在风中等你
    2020-11-27 23:00

    Use this to check if collision is detected at all, it's good starting point for further debuging:

    private void OnTriggerStay(Collider other)
    {
       Debug.Log(other);
    }
    

提交回复
热议问题