Jump to content
  • Advertisement
Sign in to follow this  

Flash - flock camera

This topic is 3848 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to make a top down camera (actually just _level0 that moves in opposite direction) that follows a group of balls and zooms (_level0 scale) whenever the group X/Y size exceeds the Stage.width/Stage.height. The camera follows the center of the group fine, but I´m having trouble with the zooming math. You can see what I mean here: http://kirl.nl/magnetBall7.3.html My zooming attempt in the example above also messes up the camera following the group center but without it, that works fine. I need help with how to calculate the scaling value for _level0. The position correction should be half the scaling value as screen 0,0 is upper left of course. The theory seems pretty straightforward, but I can't make it work.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!