I'm creating a small RPG game and everything was going well until I tried to set up the vCam in a class. It was working well when everything, the level, the vCam and the player were all in main, but now that the level is in it's own class, the vCam is acting up.
Normally, it just follows the player. It still does that but now, whenever I move the player it dithers, leaving a weird path behind it. The player is the green square. (See image below)
Also, the hitboxes stop working as well, all because I added a camera.
Does anyone know why this is happening? I got the vCam code online because I have no idea how to work with cameras in AS3.
The vCam code works by adding it to the stage as a primitive shape. The smaller it is, the more it zooms in, the larger it is the more it zooms out.
My code it here: