# Vcam messes up!

**URL:** <https://forum.kirupa.com/t/vcam-messes-up/315009>\
**Category:** flash\
**Created:** [October 14, 2010, 7:48pm UTC](https://forum.kirupa.com/t/vcam-messes-up/315009 "2010-10-14T19:48:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![L\_E\_O](https://avatars.discourse-cdn.com/v4/letter/l/f19dbf/32.png) [@L\_E\_O](https://forum.kirupa.com/u/L_E_O)\
**Post date:** [October 14, 2010, 7:48pm UTC](https://forum.kirupa.com/t/vcam-messes-up/315009/1 "2010-10-14T19:48:33Z")

</div>

Vcam is working pretty good, until i add y values to it.  
here is the code where it works fine.  
\*\*  
onClipEvent (enterFrame) {  
\_x += (\_root.hero.\_x-\_x)/4; }\*\*

but when i add the y values as such:  
\*\*  
onClipEvent (enterFrame) {  
\_x += (\_root.hero.\_x-\_x)/4;  
\_y += (\_root.hero.\_y-\_y)/4; }\*\*

what happens is MCs just fall off the screen, even though the hittests for the gravity are working fine.
