0.6.0 physics changes?

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
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

0.6.0 physics changes?

Post 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.
User avatar
Tenoch
Citizen
Posts: 76
Joined: Mon Jul 21, 2008 7:49 am

Re: 0.6.0 physics changes?

Post 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.
"When in doubt, use brute force." Ken Thompson
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: 0.6.0 physics changes?

Post 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!
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 0.6.0 physics changes?

Post by Robin »

bartbes wrote:don't correct me on this, I'm a moderator now!
I won't, "sex machine" :rofl:
Help us help you: attach a .love.
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: 0.6.0 physics changes?

Post 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 5254 times
Jammang
Prole
Posts: 8
Joined: Thu Dec 04, 2008 8:13 am

Re: 0.6.0 physics changes?

Post 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?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: 0.6.0 physics changes?

Post 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.
Help us help you: attach a .love.
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: 0.6.0 physics changes?

Post 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.
User avatar
The Burrito
Party member
Posts: 153
Joined: Mon Sep 21, 2009 12:14 am
Contact:

Re: 0.6.0 physics changes?

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 54 guests