How to make the physics pixelated?
How to make the physics pixelated?
Like, by default player moving pixel by pixel with physics is very slow, but by 1000 pixels it will be faster. Without physics 1000 pixels will be very fast. How to set the physics pixelated so it would be the same speed as without the physics? I've found love.physics.setMeter, but I don't know does this function set the physics pixelated.
Code: Select all
loves_lua = "not so",
wants_to = true
Re: How to make the physics pixelated?
Assuming I'm understanding what you want, setMeter should be exactly what you want. Box2D works with metric units, but it needs to know how many pixels a meter is, which is what setMeter will do - it decides how many pixels a meter is. It essentially just zooms in or out depending on what value you have. Unless you mean something else (pixellated usually refers to an image, not internal physics), this should be the way to do it.
Dragon
Re: How to make the physics pixelated?
Ok, thanksBobble68 wrote: ↑Thu Jun 01, 2023 9:29 am Assuming I'm understanding what you want, setMeter should be exactly what you want. Box2D works with metric units, but it needs to know how many pixels a meter is, which is what setMeter will do - it decides how many pixels a meter is. It essentially just zooms in or out depending on what value you have. Unless you mean something else (pixellated usually refers to an image, not internal physics), this should be the way to do it.
Code: Select all
loves_lua = "not so",
wants_to = true
Who is online
Users browsing this forum: No registered users and 160 guests