Page 1 of 1

What happened to "destroy"?

Posted: Mon Nov 02, 2009 12:30 am
by The Burrito
With the most recent builds of 0.6.0 my game is very close to working but destroy() no longer exists, I notice its not listed in http://love2d.org/potato/ either.
Was it removed? if so, why?

I need an efficient way to delete shapes primarily, and I was hoping for a way to delete bodies with implicit destruction of all attached shapes / joints.
perhaps theres another way to do it that I'm overlooking?

Re: What happened to "destroy"?

Posted: Mon Nov 02, 2009 6:45 am
by bartbes
Just setting the variable in which the shape/body is stored to nil should be enough.

Re: What happened to "destroy"?

Posted: Mon Nov 02, 2009 9:46 pm
by The Burrito
oh, I tried that and thought it didn't work, but under further inspection it appears that I was getting collision with an overlapping invisible shape.

Thanks!

Re: What happened to "destroy"?

Posted: Mon Nov 02, 2009 9:52 pm
by rude
I don't remember removing destroy.

WTF, sirs.

Re: What happened to "destroy"?

Posted: Tue Nov 03, 2009 12:44 am
by The Burrito
So does shape:destroy() do the same thing as shape=nil ?
I would assume I would want to use destroy.

I'm getting some random glitchy things happening still, but I'm assuming those are related to other things (currently I think most of it has something to do with testsegment).