love.physics and scaling getX/getY?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MaTachi
Prole
Posts: 2
Joined: Thu Jan 31, 2013 9:49 pm

love.physics and scaling getX/getY?

Post 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.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: love.physics and scaling getX/getY?

Post by bartbes »

setMeter should scale everything, pixels go in, pixels go out.
MaTachi
Prole
Posts: 2
Joined: Thu Jan 31, 2013 9:49 pm

Re: love.physics and scaling getX/getY?

Post by MaTachi »

I managed to get it to work. Apparently you have to call love.physics.setMeter() after creating bodies and such.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 9 guests