Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Box 2D - Deleting static objects?

Author
Message
z i l c h vortex
19
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 18th Nov 2010 12:30
In the box 2D plugin bought from the game creators is there anyway in which you can delete static objects?

Thank you.

life is short but so am i
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th Nov 2010 22:30
Just use b2DeleteBody with the ID returned when you called b2CreateBody

[b]
z i l c h vortex
19
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 19th Nov 2010 00:57 Edited at: 19th Nov 2010 01:00
This is my code


It deletes dynamic fixtures but doesn't delete static fixtures

thank you

life is short but so am i
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Nov 2010 15:24
The last parameter (DynamicOnly) of 'b2PickFixture' lets you optionally only pick fixtures attached to a dynamic body. Set it to zero to return fixtures attached to any type of body.

[b]
z i l c h vortex
19
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 21st Nov 2010 16:55
Thanks diggsey!!

life is short but so am i

Login to post a reply

Server time is: 2026-07-21 12:51:18
Your offset time is: 2026-07-21 12:51:18