CREATE YOUR WORLD
Players & Characters: Tips

Checking if a character is on the ground

5min

In this guide, we will show you how to check if the local player's Zepeto character is on the ground based on the isGrounded function provided by Unity.



STEP 1 : Write a script

  • Add a GameObject to the Scene and add the IsGrounded example script below.
TypeScript




STEP 2 : Setting up Text UI

  • Add UI > Text to the Scene.
  • In the Hierachy window, connect the Canvas > Text component to the Property displayed in the ZEPETOScript Inspector window by dragging and dropping.
Document image




STEP 3 : Run

  • If you press the Play button to run it, you can check whether the character is on the floor through the Text UI.
Document image