Page 1 of 1

0.8.0 Physics

Posted: Wed May 16, 2012 4:44 pm
by fparedesg
Hey everyone,

I'm trying out the never version of löve, but it's not even detecting basic physics functions. I don't know exactly what changes were made, so I'm not sure what I'm doing wrong. Take, for example, just this full code:

Code: Select all

function love.load()
	shape = love.physics.newRectangleShape(800, 200)
	shape:setDensity(0.5)
end
Once I run it, I get the error that 'setDensity' is a nil value. Why is this?

Also, how do you link a shape to a body? In previous versions, the first argument for new shapes asked for its body, but how does it work now?

Thanks!

Re: 0.8.0 Physics

Posted: Wed May 16, 2012 5:05 pm
by Roland_Yonaba
Hi,
I have never used love.physics module. But it seems you are using newRectangleShape() and setDensity() correctly.
Seems that setDensity() simply doesn't work. :x

Re: 0.8.0 Physics

Posted: Wed May 16, 2012 5:13 pm
by SudoCode
Obligatory "don't use love.physics if you just need standard jumping and collision".

Re: 0.8.0 Physics

Posted: Wed May 16, 2012 5:16 pm
by bartbes
Shapes don't have a density anymore, look at Fixtures.

Re: 0.8.0 Physics

Posted: Wed May 16, 2012 7:04 pm
by fparedesg
Oh..lookitthat, Fixtures. Thanks!!

Also, do you have any idea when they'll update the documentation for 0.8.0?

Re: 0.8.0 Physics

Posted: Wed May 16, 2012 9:38 pm
by Tesselode
Looks updated to me. Also, make sure you create a world for your physics objects.

Re: 0.8.0 Physics

Posted: Thu May 17, 2012 1:49 am
by jradich
Ewww physics?
I'll stick to what I know.