Physics2D Check Is Grounded (Raycast)
Checks grounded state using a raycast. If the raycast hits the ground, is grounded is true.
Optionally use Coyote Time to still return true a short time after leaving the ground.
| Parameter | Description |
|---|---|
| Origin | The transform to raycast from. Normally this is a child of the GameObject placed near the feet. |
| Distance | The distance to raycast. |
| Filter | The layer mask and other filters to use when checking for overlap. This defines what is considered 'ground.' |
| Coyote Time | The amount of time (in seconds) to still return true after leaving the ground. |
| True Event | Event to send if Is Grounded is true. |
| False Event | Event to send if Is Grounded is false. |
| Store Result | Store the result of the test in a bool variable. |
| Store Rigidbody2D | Store the Rigidbody2D of the ground object. |
Usages
used in platformers to check if a character is on the ground. Used with other actions like Rigidbody2d Jump.