Page 1 of 1

0.6.0 physics changes?

Posted: Mon Sep 21, 2009 12:34 am
by The Burrito
Hi, I'm new to the forum but have been working with LÖVE for a month or 2. The 0.6.0 release is quite exciting to me as I understand several physics bugs have been fixed, So I decided to switch my existing project over. Only problem is getLocalPoint and getWorldPoint both return the same error:

"incorrect number of arguments. Got [3], expected[2-2]"

Is this just currently broken? or perhaps there was a syntax change or something?

I'd like to continue with my project but its rather heavily reliant of physics and those functions. I'm also curious as to what exactly has changed, but I assume there will be more info on that when 0.6.0 officially comes out.

Re: 0.6.0 physics changes?

Posted: Mon Sep 21, 2009 8:53 am
by Tenoch
Actually, love.physics was heavily fixed :)
A lot of stuff there was broken. But we need to make the documentation, indeed.

As for your particular problem, the body:get(Local/World)Point() function seems to take only two parameters indeed, the x and y components of the vector you want to convert to local/world.

Re: 0.6.0 physics changes?

Posted: Mon Sep 21, 2009 2:22 pm
by bartbes
Usually these errors include the self parameter implied by :, either the code that checks the number of arguments is wrong, or something else is..

EDIT: Yes, I know I just said "a or not a", don't correct me on this, I'm a moderator now!

Re: 0.6.0 physics changes?

Posted: Mon Sep 21, 2009 3:10 pm
by Robin
bartbes wrote:don't correct me on this, I'm a moderator now!
I won't, "sex machine" :rofl:

Re: 0.6.0 physics changes?

Posted: Mon Sep 21, 2009 5:22 pm
by The Burrito
It was working fine in 0.5.0, but I poked at it a bit. essentially the line is just

body:getLocalPoint(x,y)

not including a body value obviously makes it fail, but I tried only putting one argument inside the parens and I ended up with this:
error.jpg
error.jpg (48.83 KiB) Viewed 5281 times

Re: 0.6.0 physics changes?

Posted: Tue Sep 22, 2009 10:52 am
by Jammang
sorry to butt in this seems like the right topic to ask.

is there or will there be contact filtering in 0.6.0?

Re: 0.6.0 physics changes?

Posted: Tue Sep 22, 2009 3:26 pm
by Robin
Jammang wrote:is there or will there be contact filtering in 0.6.0?
There already is in 0.5.0, it is changed in 0.6.0, but it's still there. You might want to wait until it's in the new documentation: http://love2d.org/potato/index.html
or rude or someone else comes by to explain it in full.

Re: 0.6.0 physics changes?

Posted: Wed Sep 23, 2009 9:07 pm
by The Burrito
Well, I still don't really get whats going on with the get Local/World Point commands, but I also notice that shape:destroy() no longer seams to work, which is also important to me

On a somewhat related note, is there a way I can delete a box2D world and have it automatically delete all the bodies and shapes within?


Any more incite on any of this would be great.

Re: 0.6.0 physics changes?

Posted: Thu Oct 01, 2009 1:15 am
by The Burrito
I guess no one has any ideas, on the plus side, I seam to now understand exactly how get Local/World Point fail. it only accepts a single argument inside the parens, which is the Y value, X is always 0.

Otherwise it works correctly, though that doesn't do me much good.