Page 1 of 1

love.physics.setScale(s)?

Posted: Wed Jul 29, 2009 2:32 am
by peaches
One annoying part of many Physics libraries, and Box2D in particular, is that they don't adaptively scale simulations to reduce numerical error. Using a coordinate system that's bigger than 100 in dimension tends to return some ugly errors. Other wrappers I've seen in Python mitigate this by adding a scale parameter which is applied to inputs and inversely applied to outputs. E.g.

Code: Select all

love.physics.setScale(0.1)
world = love.physics.newWorld(400,400) -- actually sends 40,40 to the native C++
world:setGravity(0,50) -- actually sends 0,5 to the native method
x,y = world:getGravity() -- script layer multiplies by 1/scale, returning the 50 we expect
Is there a place where I can submit this as a feature request?

Re: love.physics.setScale(s)?

Posted: Wed Jul 29, 2009 5:40 am
by Pliskin09

Re: love.physics.setScale(s)?

Posted: Wed Jul 29, 2009 9:23 am
by rude
This is already done in SVN. Will be released next version.