I've made a little game where you can jump on randomly generated platforms, and I'm trying to make it so that when you press G, it generates new ones.
It seems to be working fine, the platforms get cleared and new ones generate, but the actual body of the platform is still there, it's like an invisible platform.
Is it possible to remove an object from the world? I can't find anything on it D:
Thanks!
Removing objects from the world?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Removing objects from the world?
You mean World from the love.physics module, right?
In 0.8.0, you have to explicitly destroy the Bodies yourself with Body:destroy. This will also destroy all Fixtures and Joints attached to that Body.
And once you're finished using the World, call destroy on it too to clean it up.
In 0.8.0, you have to explicitly destroy the Bodies yourself with Body:destroy. This will also destroy all Fixtures and Joints attached to that Body.
And once you're finished using the World, call destroy on it too to clean it up.
Shallow indentations.
Re: Removing objects from the world?
Thanks a lot!Boolsheet wrote:You mean World from the love.physics module, right?
In 0.8.0, you have to explicitly destroy the Bodies yourself with Body:destroy. This will also destroy all Fixtures and Joints attached to that Body.
And once you're finished using the World, call destroy on it too to clean it up.
Who is online
Users browsing this forum: Bing [Bot] and 5 guests