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 dynamix] Trying to get a dynamic object from a limbs object to get GREAT COLLISIONS!

Author
Message
Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 26th Oct 2012 17:01 Edited at: 26th Oct 2012 17:05
Hi again.
I obtained my airplane as one object. This airplane is made by 9 limbs.

Now I would to give a convex mesh to each my airplane limbs.
* left wing has his own "convex shape collision"
* right wing has his own "convex shape collision"
* tail has his own "convex shape collision"
etc etc

Then I should get an airplane with a better collision system than an airplane with a single "convex mesh collision".

Somethin similar as I am using a "triangle mesh collision" (with right performances proportion eh..)

So here the code:




Then 1 problem I hope you dudes can solve:
Ok, no compiling errors but the aircraft actor I made has not physic! and has not collision!
Matty H
10
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 26th Oct 2012 17:20
Could you turn on the debug renderer and then post a screenie, this is the best way to see what the physics sees

Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 26th Oct 2012 17:38 Edited at: 26th Oct 2012 17:41
Yeah dude!
Here posted the pic where you can see other objects all with debug render lines active.. but my airplane not..


In this link you can find my X objects if you want to try my code:
http://forum.thegamecreators.com/?m=forum_view&t=201041&b=1

Attachments

Login to view attachments
Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 26th Oct 2012 17:54
EDIT:

Maybe the mystery is related to the father object... the 9010 object..
I am using this code as my first step:


But the 9010 object is a little cube... mmmmmmmmmhhh
I think maybe the physic is given to this little cube.. (this little cube is inside my airplane...)....
Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 26th Oct 2012 22:46
A lot of tests but nothing..
I can't obtain my airplane made by "convex mesh" limbs..

help!
Matty H
10
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Oct 2012 17:27
I'm going to take a look at this in a few hours, let me know if you solve the issue in the meantime.

Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 27th Oct 2012 22:01 Edited at: 27th Oct 2012 22:28
Thank you very much Matty H.
I made really lot tries but I am really stucked..

I prepare this code to let you work better from the limbs process problems..




I hope with this step-to-step example you can work better.
I attach the media for airplane wing too.

After the making of the airplane, remain the big problem..
Make all limbs CONVEX MESH to obtain each airplane parts has CONVEX MESH COLLISION SYSTEM!

Again THANKS mate!

Attachments

Login to view attachments
Matty H
10
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Oct 2012 23:36 Edited at: 27th Oct 2012 23:50
Thanks for the code, the part where you create the limbs completely messed up the object for me, so I never used that part.

Here is a solution:



It's not exactly what you asked for but it gives a perfect collision shape for your plane.

Advantages:
- No confusing limb code, just get your shapes looking like a plane and make convex meshes for everything and join them together with physics joints.
- Plane can fall apart if needed, just delete joints upon crash.
- Less code, not as complicated.

Disadvantages:
- May not be as efficient with joints as it would be with compound actor, I doubt it makes much difference.


I had issues with convex shape(compound) and that model, I will need to investigate further, but hopefully I have given you a better solution above.





EDIT: Modified code, code above needs PhysX constants file. Code below does not, also shows how to blow off a wing



Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 28th Oct 2012 12:37 Edited at: 28th Oct 2012 12:39
Matty H, I have no words.. just really THANK YOU!.
you did EXACTLY what I meant!

So I did not need to use LIMBS PROCESS to obtain my complete aircraft but just to put in the right coords each parts and to use DarkDynamix commands to build (join) my aircraft.

Quote: "
I had issues with convex shape(compound) and that model, I will need to investigate further, but hopefully I have given you a better solution above.
"

had you got issues about wing model?.. So the limbs process problem is related to this?
in fact I got some issues about too.
I think I done some error when I exported the wing X model using DELED.. (UV coords and scale parameters..)


But no problems about, my objective was :

1)to obtain all the aircraft parts covered with a "convex mesh collision map"

2)to have a main object (DarkDynamix actor) made by all the aircraft parts!

And now I have both!

Again a BIG THANK YOU for your committed and result!
Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 28th Oct 2012 13:44 Edited at: 28th Oct 2012 15:21
I edited the code :



I add the "attach_wings object part" and I add the code to join it.
Then I delete the DYN ADD FORCE command so I should to obtain my aircraft made by body, left wing, right wing and attach_wings and my aircraft should be stopped...

But after I added the "attach_wings" so I get my airplane getting some forces that make it roll over...
Why?


PS. Matty H please, don't kill me!


EDIT:
Probably I understand why once I add the "attach_wings" object so I get my airplane moving as some forces are pushing it!.
I notice that some surface area of "attach_wings" object is inside the left wing and right wing too.

So the left wing, the right wing and the attach_wing objects are stuck with each other... then this "collision" is generating a force between these stucked objects..

This is confirmed when I put the attach_wings object a bit more higher in Y coords in a way it isn't stucked in the wings.
In this way, when I run the program, I get NO strange forces pushing my airplane!

Do you think all that is correct?

And especially, do exist some commands to let me choose that one object has NOT to collide with another one?
In this way I will obtain the airplane parts can't collide each others!


.
.
.
.
LAST EDIT:
I make the "attach_wings" object X size one unit lesser (then it isn't stucked on wings)and I get no strange force moving my airplane plus I get the original airplane shape!
So the problem is already solved!

Remain the question (If we WANT ON PURPOSE to assemble the aircraft with stucked objects) about a command that make us to choose that one object can't collide with another!
Matty H
10
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 29th Oct 2012 15:45
There are commands which filter collisions, take a look at the examples. I don't have them on this computer but if you are still stuck I will post more information later.

Alduce
16
Years of Service
User Offline
Joined: 26th Oct 2002
Location: Rama spaceship
Posted: 29th Oct 2012 16:05
Quote: "There are commands which filter collisions, take a look at the examples. I don't have them on this computer but if you are still stuck I will post more information later."


I was reading about the DarkDynamix help file finding the SET GROUP commands interesting about.
Testing time

Login to post a reply

Server time is: 2019-04-24 08:07:48
Your offset time is: 2019-04-24 08:07:48