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 / Dark Physics: Deletion of phy objects

Author
Message
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 1st Mar 2010 17:48
Hello everybody, I'm trying to write a function that removes all content, physics, everything loaded, so a next map can be loaded.

Everything works, however, it doesn't seem to delete the physics properly. I'm using Dark physics.

Here is my deletion function:



Any help is much appreciated! Thanks!

Regards,
Sph!nx
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 1st Mar 2010 18:28
Are you removing all object and going to load new ones, if so then try phy clear no looping just that.

Dark Physics makes any hot drink go cold.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 2nd Mar 2010 03:37 Edited at: 2nd Mar 2010 03:39
"Phy Clear" is bugged, will crash DP. To restart physics you have to restart it, "Phy Stop" / "Phy start". And this pretty tricky if you use asynchronous updating, if i remember correctly i had to "Phy Update 0" and "Phy Update 1" before "Phy Stop" or suffer... yeah, a crash.

And when you get in to intricate joint arrays "phy stop" crashes physx also if joints still exists. I had to revert to looping trough all joints and rigids and delete them first. Took forever to get it reliable.

Regards
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 2nd Mar 2010 15:17
This is another example of the bugged out Dark PhysX module. You have to basically release physx and reaload the system in order to properly clear any PhysX mesh.
Maple Engine
14
Years of Service
User Offline
Joined: 26th Jan 2010
Location:
Posted: 7th Mar 2010 11:10
Hello,
i know this reply is a little late but im haveing the same problem with my game engine(current stage: useless)
im trying to restart dark physics and deleat all the phy objects so i can load a differant map but using
if keystate(15) = 1
phy update 0
phy update 1
phy end
phy clear
phy start
`tells the next map to delete and reload normal objects
time = 1
map_number = 2
endif
it crashes, but whene i use

if keystate(15) = 1
PHY DELETE CHARACTER CONTROLLER 3
`tells the next map to delete and reload normal objects
time = 1
map_number = 2
endif

i get an error(whene i press the tab key(keystate15)) that says
Charecter controler already exists, can't overwrite it

please can someone give me some example code that would clear all of the physics stuff and set time = 1 and map_no = 2

Thanks

Login to post a reply

Server time is: 2024-03-28 20:01:26
Your offset time is: 2024-03-28 20:01:26