• Advertisement
Sign in to follow this  

Inverting Y-Axis ?

This topic is 4557 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

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 ?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


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

  • Advertisement