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 / Phy Delete Rigid Body not work for Static Meshes?

Author
Message
Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 16th Feb 2012 19:03 Edited at: 16th Feb 2012 19:56
When I try to delete a static mesh (as a level) no debug errors occur, yet the old mesh appears to still exist, just because it's restricting where I can go and the restrictions feel awfully familiar to the previously loaded static mesh.

Here is a video to demonstrate what's going wrong:



The code I am using to delete the rigid bodies:


Also, I also call this before I call 'DeleteAll()' (the delete all function has worked on non-static rigid bodies). I was testing if DeleteAll() was the problem:

phy delete rigid body scene(scene).Map.num

But the same problem occurs, so it's not that.

Is there a possibility it's a bug in Dark Physics? Before I updated my Dark Physics I was unable to delete Character Controllers (after update with no changes to the code it worked), but at least that came up with an error.

Perhaps there's an alternative.


[edit] removed a dumb statement


HowDo
16
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 16th Feb 2012 20:47 Edited at: 16th Feb 2012 21:39
when you do it the first way are you using same objects or are they all reload?

I think this is a known fault from way back and nobody found it then to get it fixed.

I think the solution might be use this command

PHY SET COLLISION STATE

on each of the object you have removed.

I am sure I seen another command that might help but can't recall were or what ?

edit
think I found it.

phy clear.

edit 2

plus while looking found this one

PHY MAKE SCENE

check it out.

Dark Physics makes any hot drink go cold.
Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 17th Feb 2012 00:09
I must admit I didn't think looking at that part of the manual, but Phy Clear solves the problem, thank you. It did strike me odd that it was the only thing that couldn't be deleted. I will explore the Phy set collision state if I'm not deleting all physics data.

Quote: "when you do it the first way are you using same objects or are they all reload?"


They're all a reload. I'm using free objects instead of specific numbers, but both scenes use the same functions, the variable data is made up of filenames, positions, rotations, scales, camera positions and so on. So that's why I didn't think it could be anything else.


Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 17th Feb 2012 01:22 Edited at: 17th Feb 2012 03:11
I encounter the problem problem below when using the Phy Clear solution (I've just tried reloading a scene I've previously loaded)

Link

In fact it only lets me call Phy Clear once, all other times it crashes.

Somehow I get the feeling Dark Physics is buggy. If worst comes to worst I've got some Newton Physics code from an old project that I know will work. In fact, it might even be a better idea because Newton doesn't require any users to download drivers, even though I like playing with DP.

Also I tried Phy Set Collision State as well and that suffers from the exact same problem as phy delete rigid body.

[edit]
Got a scene set up using Sparky's collision instead. Does what I need it to do and it's all working fine. I used to get a lot of crashes using Dark Physics too, at first I thought it might have been my computer moaning at me, but I've not had any crashes since compiling using Sparky's, so it's probably the best solution.


MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Feb 2012 09:23
hmm... I may try Sparky's but I think I will give DP a run for its money when I start using a physics engine... no idea how to use newtons but Sparkey's seems like the only alternative for me...

I was thinking Phy Clear as well... but I think you need to initialise PhysX again after using it maybe? now?

nah ah found it

PHY END
Quote: "This command is used to stop the physics process and unload all resources that it uses. After calling this command if you require to use the physics engine again you must make a call to phy start. "


Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 21st Feb 2012 12:04
DP is pretty good, it's pretty easy to set up and to get running, I've used Newton's before and have found DP easier to use.

Sparky's is great for collision and it's pretty reliable and speedy, though, I'm gonna stick to it for this project so people don't have to download the drivers and I'm not using and proper physics.


MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Feb 2012 12:21
hmm... what about the built in ODE engine then? isnt Sparky's overkill?

Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 21st Feb 2012 12:39
Never actually used it. ODE is a physics engine, Sparky's is collision, so you could probably argue that whilst DBP has physics and collision commands built in that collision and physics DLLs are redundant, but it's a case of ease of use and features available. Sparky's is supposed to be faster and more reliable that DBP's built in collision commands.


MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Feb 2012 12:47
So Nuclear Glory becomes a redundant purchase?

[btw did neither you and me sleep last night? lol I have been reading non stop since like 11pm last night]

Seppuku Arts
Moderator
15
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 21st Feb 2012 13:49
Depends on what you want and what works best for you. I've never used Nuclear Glory, I've always been able to find free stuff does what I want...except of course I did pay for Dark Game Studio Bonanza, but that's an exception (I probably wouldn't have got DP otherwise, but DGK Bonanza is too good of a deal to pass up).


MrValentine
AGK Backer
8
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Feb 2012 14:29
Yeah it should be nick named BONKERS but lol...

Hmm I kept thinking Sparky's was a physics library... hmm

Login to post a reply

Server time is: 2019-08-20 11:41:31
Your offset time is: 2019-08-20 11:41:31