Page 1 of 1

love.physics and scaling getX/getY?

Posted: Thu Jan 31, 2013 9:56 pm
by MaTachi
Hi!

I'm using love.physics, and currently everything is measured in pixels, which is bad if you read the Box2D manual. But it's convenient since I can more or less draw my images directly on the position given by body:getX() and body:getY(). How am I supposed to do to handle the scaling neatly? I have played around a bit with love.physics.setMeter(), but it only seems to scale the velocity, I think.

Re: love.physics and scaling getX/getY?

Posted: Thu Jan 31, 2013 10:48 pm
by bartbes
setMeter should scale everything, pixels go in, pixels go out.

Re: love.physics and scaling getX/getY?

Posted: Sat Feb 02, 2013 3:12 pm
by MaTachi
I managed to get it to work. Apparently you have to call love.physics.setMeter() after creating bodies and such.