# How to create a camera animation move smooth when click on the floor?

**URL:** <https://forum.babylonjs.com/t/how-to-create-a-camera-animation-move-smooth-when-click-on-the-floor/20818>\
**Category:** Questions\
**Created:** [May 14, 2021, 6:41pm UTC](https://forum.babylonjs.com/t/how-to-create-a-camera-animation-move-smooth-when-click-on-the-floor/20818 "2021-05-14T18:41:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VictorBwD](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/victorbwd/32/16203_2.png) [@VictorBwD](https://forum.babylonjs.com/u/VictorBwD)\
**Post date:** [May 14, 2021, 6:41pm UTC](https://forum.babylonjs.com/t/how-to-create-a-camera-animation-move-smooth-when-click-on-the-floor/20818/1 "2021-05-14T18:41:39Z")

</div>

Hi! I was looking for some help to make thing like this: [Babylon.js Playground](https://playground.babylonjs.com/#W844XY)

But only when it touches the ground, and not any mesh.

I have an invisible ball, when the user clicks on the floor the camera moves to the position of the ball. However, I would like to make an animation of the camera going to the position, and not just teleporting.

---

<div class="post-metadata">

**Author:** ![br-matt](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/br-matt/32/22436_2.png) [@br-matt](https://forum.babylonjs.com/u/br-matt)\
**Post date:** [May 14, 2021, 6:51pm UTC](https://forum.babylonjs.com/t/how-to-create-a-camera-animation-move-smooth-when-click-on-the-floor/20818/2 "2021-05-14T18:51:39Z")

</div>

You could just check if its the ground they clicked on with `.name`

[https://playground.babylonjs.com/#W844XY#4](https://playground.babylonjs.com/#W844XY#4)

---

<div class="post-metadata">

**Author:** ![VictorBwD](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/victorbwd/32/16203_2.png) [@VictorBwD](https://forum.babylonjs.com/u/VictorBwD)\
**Post date:** [May 14, 2021, 7:29pm UTC](https://forum.babylonjs.com/t/how-to-create-a-camera-animation-move-smooth-when-click-on-the-floor/20818/3 "2021-05-14T19:29:34Z")

</div>

Thank you man, I’ll try to adapt it to my code. I don’t think I even need the ball.
