Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2d camera functions
#1
I want to set up a 2d camera such that it zooms in or out to accomodate for a player moving out of screen, not translating the screen. The screen needs to maintain a 4: 3 aspect ratio. Any ideas how I might go about calculating it?
am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
Reply
#2
Hmm....well I think the real problem would be the scaling of the sprites/tiles.
You could use OpenGL, Im not entirely sure how you would calculate the zooming in/out, but if I think about it for some time I could figure it out...
It's the difference between asking someone how much flour goes into pancakes, and handing them a sorry mix of oozing green goo and asking them to fix it." - Deleter

-Founder & President of the No More Religion Threads movement-
Reply
#3
Well I don't know much about OGL yet, but if you set up a 2D plane in 3D space with opengl then all you should have to do is adjust the z axis of the plane to zoom in and out, and to focus on a specific point just adjust the x and y along with the z.
url=http://www.smithcosoft.com]SmithcoSoft Creations[/url]
"If you make it idiot proof, someone will make a better idiot" - Murphy's Law
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)