# FollowCamera using setLinearVelocity()

**URL:** <https://forum.babylonjs.com/t/followcamera-using-setlinearvelocity/167>\
**Category:** Questions\
**Created:** [December 11, 2018, 8:06pm UTC](https://forum.babylonjs.com/t/followcamera-using-setlinearvelocity/167 "2018-12-11T20:06:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kraftwer1](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kraftwer1/32/98_2.png) [@kraftwer1](https://forum.babylonjs.com/u/kraftwer1)\
**Post date:** [December 11, 2018, 8:06pm UTC](https://forum.babylonjs.com/t/followcamera-using-setlinearvelocity/167/1 "2018-12-11T20:06:03Z")

</div>

I want my camera to follow a ball that is moving by setting its linear velocity.  
But this results in some kind of bouncy effect: [Babylon.js Playground](https://www.babylonjs-playground.com/#J0M3BM)

I’ve tried adjusting these values - but none of them helped:  
// camera.heightOffset = 10;  
// camera.rotationOffset = 0;  
// camera.cameraAcceleration = 0.005  
// camera.maxCameraSpeed = 10

…or is there any other way to “just follow a mesh”? I’ve also tried copying the balls position to the cameras position within the render loop but that doesn’t work smoothly either…

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [December 11, 2018, 9:08pm UTC](https://forum.babylonjs.com/t/followcamera-using-setlinearvelocity/167/2 "2018-12-11T21:08:40Z")

</div>

What about setting acceleration to 0?  
[https://www.babylonjs-playground.com/#J0M3BM#1](https://www.babylonjs-playground.com/#J0M3BM#1)

---

<div class="post-metadata">

**Author:** ![trevordev](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevordev/32/16_2.png) [@trevordev](https://forum.babylonjs.com/u/trevordev)\
**Post date:** [December 11, 2018, 9:38pm UTC](https://forum.babylonjs.com/t/followcamera-using-setlinearvelocity/167/3 "2018-12-11T21:38:42Z")

</div>

I think the followCamera was intended to follow a character so it rotates around it’s object to face it’s forward. The bouncy effect you are seeing looks to be caused by the balls rotation’s forward to change as it rolls.

You can get whatever behavior you would like by updating a free camera each frame see:  
[https://www.babylonjs-playground.com/#J0M3BM#3](https://www.babylonjs-playground.com/#J0M3BM#3)
