Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Is it ok to reverse y axis?  (Read 1594 times)

0 Members and 1 Guest are viewing this topic.


  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Is it ok to reverse y axis?
« on: June 04, 2017, 09:26:14 am »
So I found that SFML is using conventional coordinate system where -Y goes up and +X goes right. But since my game engine classes are based on normal coordinate system (conventional mathematical coordinate system), the reverted Y axis is breaking them. Should I reverse Y axis, and is this idea wrong? And how can I reverse it. Thanks :).


  • SFML Team
  • Hero Member
  • *****
  • Posts: 10911
    • View Profile
    • development blog
    • Email
Re: Is it ok to reverse y axis?
« Reply #1 on: June 05, 2017, 11:18:12 am »
Use a "math" layer where you do all the calculation you need, then have a conversion layer that translates your calculated information into the graphics layer that then renders your results to the screen.
That way all you need to do is flip the Y axis inside the conversion layer.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
Dev Blog: https://duerrenberger.dev/blog/