Help on Destructible Objects
by Raster Ron · in Torque 3D Professional · 09/06/2013 (4:37 am) · 4 replies
Hi,
Just recently trying out destructible objects and tutorial here:
http://docs.garagegames.com/torque-3d/official/content/documentation/Artist%20Guide/Tutorials/DestructibleObjects.html
I got the object loaded and added the physicsShape.cs file inside the folder. The problem is it does not get destroyed no matter how I fire projectiles or make it explode using mines.
Are there any full tutorial on how to make this work?
Just recently trying out destructible objects and tutorial here:
http://docs.garagegames.com/torque-3d/official/content/documentation/Artist%20Guide/Tutorials/DestructibleObjects.html
I got the object loaded and added the physicsShape.cs file inside the folder. The problem is it does not get destroyed no matter how I fire projectiles or make it explode using mines.
Are there any full tutorial on how to make this work?
About the author
Artist/Gamer/Developer/Full Stack Web Developer
#2
Also, I examined again the sample destructible files and it seems that I don't see any broken mesh on both fence and crate. This is my first problem from the start.
Am I missing something?
09/06/2013 (10:05 am)
Thanks Robert. I did find and check that old thread first before posting and have not tested it yet. BTW, the OP did not indicate the name of the file and where it should go. Any ideas?Also, I examined again the sample destructible files and it seems that I don't see any broken mesh on both fence and crate. This is my first problem from the start.
Am I missing something?
#3
I'm trying to implement the same resource and I'm having trouble deciding where to put the physicsShape.cs. I would think it should go in the datablocks folder under art and then executed in datablockExec.cs but that didn't work. I might go under the server-side folder, haven't tried that yet. But the resource writer says the script goes in the same directory as the model versions. Does that mean the script is just placed in the same folder as the model? Tried that and it didn't work.
Help here would be appreciated.
06/29/2014 (8:24 am)
I can help with at least one thing here. The creator of the max file linked in the resource simply hid the broken elements of the model. He combined both broken and unbroken components in one file so you have to export out different versions of the model from one source file.I'm trying to implement the same resource and I'm having trouble deciding where to put the physicsShape.cs. I would think it should go in the datablocks folder under art and then executed in datablockExec.cs but that didn't work. I might go under the server-side folder, haven't tried that yet. But the resource writer says the script goes in the same directory as the model versions. Does that mean the script is just placed in the same folder as the model? Tried that and it didn't work.
Help here would be appreciated.
#4
Remember however that when you place the object in the World Editor ... you must NOT use the mesh and you should use the Scripted Object ... typically under the PhysicsShape folder.
Most people forget to do this and place just the mesh in to the world editor ... the mesh is treated as any other static shape ... it is the scripted object that will adhere to the rules for physics.
I can show you an example when I get home tonight ... currently at work so no access to my working PhysX models for Re-Spawn.
HTH
Edit: I know this is an old topic ... but I only came across it now. 8-{
07/11/2014 (2:43 am)
Your PhysX shapes need to be split in to two seperate files (normal and broken) ... your cs file that handles mass and which one is broken and which one is normal should be in your datablocks folder under the are folder and should be executed with the datablock exec.Remember however that when you place the object in the World Editor ... you must NOT use the mesh and you should use the Scripted Object ... typically under the PhysicsShape folder.
Most people forget to do this and place just the mesh in to the world editor ... the mesh is treated as any other static shape ... it is the scripted object that will adhere to the rules for physics.
I can show you an example when I get home tonight ... currently at work so no access to my working PhysX models for Re-Spawn.
HTH
Edit: I know this is an old topic ... but I only came across it now. 8-{
Torque Owner Robert Fritzen
Phantom Games Development