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 / Help: Player controller & rigid body physics deletion

Author
Message
Sph!nx
10
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 13th Feb 2011 18:43 Edited at: 13th Feb 2011 18:44
Hello everybody,

I'm having some trouble with the deletion of the character controller and rigid body physics. This is the objects deletion function (objects are types that are spawned around the game world):



Whenever I reload a level, it says the character controller cannot be made, since it already exists. Any help is greatly appreciated!

Thanks!

Regards Sph!nx
http://www.mental-image.net
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Feb 2011 19:12 Edited at: 13th Feb 2011 19:12
hopefully you are near the end of your tidying up routines to re-run the project.

try add this, done as a gousub. should work inside the right function part you made. look up phy end.



Dark Physics makes any hot drink go cold.
Sph!nx
10
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 13th Feb 2011 19:57 Edited at: 13th Feb 2011 19:57
Thanks a lot HowDo,

I've added it in the code (see code snippet). After deactivation I activated the physics again (cause I have that elsewhere in the code). So it should reset it right? unfortunately it did not... it still gives me the error, whenever I load a level the second time, that the controller already exists.



Any more help is greatly appreciated! Thanks!

Regards Sph!nx
http://www.mental-image.net
HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 14th Feb 2011 17:32
heres the compo demo code where I got the above bit from for restarting physic. have a look around it you may see something that been left out of your code, it does other things as well.



Dark Physics makes any hot drink go cold.
Sph!nx
10
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 14th Feb 2011 18:10
Thanks a lot, I'll try to find my problem and let you know how it went.

Regards Sph!nx
http://www.mental-image.net

Login to post a reply

Server time is: 2019-06-16 23:36:49
Your offset time is: 2019-06-16 23:36:49