Hello everybody, I am a noob in Love2D
I am writing a Physics simulator in Love2d. To be more precise is a free fall simulator, very basic stuff. I need to work with meters per second, but I do not know how to do this, since every unit in Love2D is in pixels. How can I correct this problem? I managed to work with love.physics.getMeter() but what does the returning number means? How can I work with it?
Thanks!
Help for converting units in Love2D
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 1
- Joined: Thu Jun 25, 2020 2:39 am
Re: Help for converting units in Love2D
The love.physics module is a binding of Box2d. https://love2d.org/wiki/love.physics
In box2d the distance is in meters, not in pixel.
love.physics.getMeter() return how much pixel equals 1 meter inside the box2d world.
If you don't want to use Box2d, just set an arbitrary global number as the number of pixel per meter and use it everywhere.
In box2d the distance is in meters, not in pixel.
love.physics.getMeter() return how much pixel equals 1 meter inside the box2d world.
If you don't want to use Box2d, just set an arbitrary global number as the number of pixel per meter and use it everywhere.
Who is online
Users browsing this forum: No registered users and 2 guests