Skip to main content
GameDev.net gamedev.net
🔒 Locked

Inverting Y-Axis ?

Started by Endemoniada Sep 1, 2005 at 10:10 PM 0 replies 350+ views
Original Post
Endemoniada
Endemoniada
Hi guys, I set up a custom orthogonal projection for my 2D engine. Everything works great except that the Y-axis goes from the bottom up. When I calculate the destination Y values I simply do destY=ScreenHeight-y but I was hoping to eliminate that step and make the Y-Axis start at 0.0 at the top and increase going down (like regular 2D). I tried switching the top and bottom values in the matrix but it didn't work. Any ideas ?
matthughson
matthughson
I think you'll actually find having the positive y axis pointing up is actually a little more intuative. It just takes a little getting used to if your coming from straight windows and GDI programming. For example, think of a platformer. When the player jumps, you move them in the positive direction. And to apply gravity, you apply a negative force. Makes sense to me [wink]

Matt Hughson
__________________________________[ Website ] [ Résumé ] [ [email=contact[at]matthughson[dot]com]Contact[/email] ][ Have I been Helpful? Hook me up! ]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.