Genbox / VelcroPhysics

High performance 2D collision detection system with realistic physics responses.
MIT License
662 stars 114 forks source link

Invert Y axis #65

Closed ambs closed 3 years ago

ambs commented 3 years ago

Unfortunately, I am not. Still, I am an active member of the open-source community (see https://metacpan.org/author/AMBS for my contributions to the Perl community as an example). Thus, while I understand your point of view. Anyway, be free to delete the ticket if you like

Describe the feature In my classes on Game Development, I use a Camera class, that inverts the Y-axis, and maps units (meters, for instance) to pixels. I am attaching it just in case you like to see it. https://gist.github.com/ambs/d147cfd65d470f2131825b4e2426b931

To use VelcroPhysics directly, I need to set a negative gravity value. It would be nice to have an option to just invert this axis. Not sure how hard, and how much efficiency we would lose. But it would be cool to have.

Genbox commented 3 years ago

Cameras and drawing are outside the scope of a physics engine. I do have a small game framework built into the samples, but they are more of a starter kit than anything else. I also have a ConvertUnits class you can use to translate between meters (default in Velcro) and pixels.

See Camera2D and ConvertUnits.