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.

Dark Physics & Dark A.I. & Dark Dynamix / deleting rigid bodies

Author
Message
dradius
17
Years of Service
User Offline
Joined: 9th Aug 2007
Location: cubicle
Posted: 15th Aug 2007 23:16
hi,

is it possible to delete phy rigid bodies in the middle of a program? i am trying to delete an object in my simulation after about fifteen seconds has passed, and i think im having problems with the timer too (im a noob at it).

im guessing its a bit more complex than
Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 15th Aug 2007 23:45 Edited at: 15th Aug 2007 23:46
Quote: "is it possible to delete phy rigid bodies in the middle of a program "


Yes but try to limit the number of objects deleted per loop.

As for the timer:



Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
dradius
17
Years of Service
User Offline
Joined: 9th Aug 2007
Location: cubicle
Posted: 16th Aug 2007 16:34
i cant get it to work. its in the main loop and instead of stopping an object it goes straight through. once i comment it out, 701 start blocking things again.
Kendor
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 16th Aug 2007 17:15
Obviously, once you delete a rigid body, it will no longer register for collision. Additionally, remember to place starttime = timer() were you want the 15 seconds to start.

The best solution is to post up your code, with an explaination on what you are trying to achieve, so that we can help you

Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.

Login to post a reply

Server time is: 2024-11-24 18:39:54
Your offset time is: 2024-11-24 18:39:54