# How an character realize it's time to go up and go down?

**URL:** <https://forum.babylonjs.com/t/how-an-character-realize-its-time-to-go-up-and-go-down/10472>\
**Category:** Questions\
**Created:** [May 1, 2020, 3:17pm UTC](https://forum.babylonjs.com/t/how-an-character-realize-its-time-to-go-up-and-go-down/10472 "2020-05-01T15:17:36Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![gbz](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/gbz/32/23780_2.png) [@gbz](https://forum.babylonjs.com/u/gbz)\
**Post date:** [May 5, 2020, 5:11pm UTC](https://forum.babylonjs.com/t/how-an-character-realize-its-time-to-go-up-and-go-down/10472/7 "2020-05-05T17:11:49Z")

</div>

Hey @moxierichard, have you looked into [Cameras, Mesh Collisions and Gravity - Babylon.js Documentation](https://doc.babylonjs.com/babylon101/cameras,_mesh_collisions_and_gravity) (defining an ellipsoid for your character mesh and using `moveWithCollisions`)?

Could you check out the Playground from this Question post: [Raycast to check if player is standing on ground](https://forum.babylonjs.com/t/raycast-to-check-if-player-is-standing-on-ground/9649)? It uses WASD for movement and SPACE for jump and utilizes `moveWithCollisions` and raycasts to check if the character is on a floor.

Edit: Added a slide for you 🙂  
[https://www.babylonjs-playground.com/#3EDS3A#16](https://www.babylonjs-playground.com/#3EDS3A#16)

 ![Screenshot (835)](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/3/3792c22c21d7d6f596cfd2764b1558d1ea933a9a.png)

Also, I don’t remember what was in the Espilit soure code, however it makes sense that raycasts weren’t used, since there was no need to check if the player was on a ground (e.g. for jumping logic). They would only need to use `moveWithCollisions`.

---

_[View the full topic](https://forum.babylonjs.com/t/how-an-character-realize-its-time-to-go-up-and-go-down/10472)._
