Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


isGrounded

Was the CharacterController touching the ground during the last move?
Read time 1 minuteLast updated 6 days ago

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule
public bool isGrounded { get; }

Remarks

Indicates whether the CharacterController was touching the ground during the most recent call to CharacterController.Move or CharacterController.SimpleMove.
This property is updated after each call to Move, based on collision detection with the ground. It returns true if the controller collided with any object below it during the movement — typically used to determine if the character is standing on a surface (e.g., terrain, platform, floor).

Examples

using UnityEngine;public class Example : MonoBehaviour{ CharacterController characterController; void Start() { characterController = GetComponent<CharacterController>(); } void Update() { if (characterController.isGrounded) { print("CharacterController is grounded"); } }}