# How to detect that camera is not falling?

**URL:** <https://forum.babylonjs.com/t/how-to-detect-that-camera-is-not-falling/4330>\
**Category:** Questions\
**Created:** [July 7, 2019, 9:54am UTC](https://forum.babylonjs.com/t/how-to-detect-that-camera-is-not-falling/4330 "2019-07-07T09:54:15Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Abdullah\_Alkawatrah](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/abdullah_alkawatrah/32/3228_2.png) [@Abdullah\_Alkawatrah](https://forum.babylonjs.com/u/Abdullah_Alkawatrah)\
**Post date:** [July 16, 2019, 11:00pm UTC](https://forum.babylonjs.com/t/how-to-detect-that-camera-is-not-falling/4330/7 "2019-07-16T23:00:02Z")

</div>

@splash27, I found where i got the concept of using ray cast to detect if camera is on top of something.

> [@How to detect avatar is on the ground?](https://forum.babylonjs.com/t/how-to-detect-avatar-is-on-the-ground/516/16):
>
> Ok, I’ve settled with this When I walked off the car my algorithm determined that she was off the ground and automatically enabled flight mode (in reality one could easily step off the car, but I had to make some sacrifices). Then I manually flew (PG-UP and PG-DOWN keys) over the building and when I got close to the roof it automatically turned off flight mode, then when I walked off it turned on flight mode. That’s good enough for now. I’m only use one raycast for this.

---

_[View the full topic](https://forum.babylonjs.com/t/how-to-detect-that-camera-is-not-falling/4330)._
