# VCam problem

**URL:** <https://forum.kirupa.com/t/vcam-problem/330635>\
**Category:** flash\
**Created:** [February 20, 2013, 8:19pm UTC](https://forum.kirupa.com/t/vcam-problem/330635 "2013-02-20T20:19:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Erdo\_FcbHacker](https://avatars.discourse-cdn.com/v4/letter/e/ec9cab/32.png) [@Erdo\_FcbHacker](https://forum.kirupa.com/u/Erdo_FcbHacker)\
**Post date:** [February 20, 2013, 8:19pm UTC](https://forum.kirupa.com/t/vcam-problem/330635/1 "2013-02-20T20:19:12Z")

</div>

I am trying to make the VCam follow the player but when I increase the player speed the objects ( a bar showing some stats about the character ) attached to the VCam starts shaking . The code in the VCam is :  
onClipEvent(enterFrame){  
this.swapDepths(this.\_root.getNextHighestDepth());  
\_x += \_root.player.\_x - \_x;  
\_y += \_root.player.\_y - \_y;  
}  
What I want is that the player stays on the center without being affected by its speed and objects inside VCam dont shake . Please help .
