love.physics.setScale(s)?
Posted: Wed Jul 29, 2009 2:32 am
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.
Is there a place where I can submit this as a feature request?
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