Jump to content

Scale tilemap and follow sprite [camera issue]


z0nics
 Share

Recommended Posts

Hi guys!

I'm doing a 2D game with tiled map and I've run into a problem.

When the group of objects (map layer and unit sprites) scaled, and camera is focused on sprite (by following with lerp), camera.view, or autoCull (or something else) gets some offset lag :(

But all works fine with image map. You can uncomment the /* image map */ section in 'create' tab to check it out. Dont forget to comment the /*  tile map */ section ;)

Just look: http://phaser.io/sandbox/edit/XNQoDGUq

Buttons:

LEFT ARROW - center camera on unit1 and scale group to 1.2 (if not zoomed);

RIGHT ARROW - center camera on unit2 and scale group to 1.2 (if not zoomed);

UP ARROW - unzoom (set group scale to 1);

 

Spent last two days to fix this out, but have no more ideas.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...