[Released] DestroyIt - Cinematic Destruction System

Hi @bbaugh007 ,

The support points are really designed to just add a little clinging debris to objects that are supported by other, larger structures - like a window in a building - the system is there to let some of the pieces continue clinging to the frame for a more realistic effect. I wouldn’t try to use support points to make realistic cannonball holes through doors.

For that, you would first need to break your object up a lot, into really small pieces. Probably 100-200 or more debris pieces for a single wall. Performance will become an issue quickly if you create an entire building made of walls with this many debris pieces, but it can be done.

I’m not sure I understand what you mean by objects exploding entirely when they receive damage - that sounds like you are using a particle effect and maybe the cannonball is doing too much damage and you have Can Be Obliterated checked on your Destructible object. If that is checked, then when it receives 3x the amount of damage it has, then it just explodes into the particle effect. You can turn this off by un-checking Can Be Obliterated. Also, if you are only using a fallback particle effect (no destroyed prefab), you will get that same effect because there is nothing else for the object to destroy into.

1 Like

The goal is to have an imported house object’s walls behave like the walls of the example tower object in the attached images.

8626695--1159173--tower.PNG
8626695--1159176--tower2.PNG

Oh ok, so you just need to know how to use the cling points to get the same effect as the tower in the demo scene?

We don’t have a video tutorial of that process specifically, but if you look in the DestroyIt User Guide on page 14 it illustrates how to position the Cling Points.

From the user guide:
"You add the Cling Point script to colliders on your destroyed prefab. When debris is spawned, the DestroyIt system looks for cling points and raycasts against adjacent colliders. If the raycast hits something, it rolls a percent chance based on Chance to Cling that you specify. If it passes that check, it strips the rigidbodies off the debris piece and parents it under the object it clings to. This provides better performance and a rock-solid joint over hinge joints.
To the right is an illustration showing how cling points appear in the inspector. This is the destroyed prefab for the glass pane. On the edges, you can see the “pin” gizmos that indicate the direction the raycasts will be fired from the debris piece to check for adjacent colliders to cling to."

So you just need to place the Cling Points so the pin gizmos point to the object you want the debris piece to cling to. I hope that helps. Please let me know if you have any specific issues getting it to work.

1 Like

Thank you!

Hi Zangad,

I’ve updated Destroyit and re-imported it to my project but I don’t have the new stuff from 1.15, and the changelog textfile still says 1.14.
8697897--1173924--upload_2023-1-1_20-6-4.png
There is no “Limit Damaged” tick visible in the component.
On the package manager window there’s still only the v1.14 changelog textfile, and you can see I have imported the current version of 1.15.

Hi @EpicMcDude ,

Sorry you’re having issues getting the latest version. Sometimes, the Unity package manager seems to want to hang onto the cached version of an asset. I’ve had this issue a couple of times with other developers’ assets, and we’ve seen it a few times with our other asset (ProTips).

The problem seems to be with the Package Manager ( more info here ). But there’s a workaround:

Go to your %AppData% folder where your Unity asset cache is, and delete the ModelShark Studio folder (C:\Users[YOURNAME]\AppData\Roaming\Unity\Asset Store-5.x*ModelShark Studio*). That will remove all of the cached versions of DestroyIt you may have downloaded. Then, restart the Unity editor (refreshing wasn’t enough for me) and open the Package Manager again, and you should be able to download and import the new version.

If that doesn’t work for you, or if you’re using a much older version of Unity and trying to install the newest version of DestroyIt, please send us an email at modelsharkstudio@gmail.com and we’ll send you a unitypackage containing the latest version, which you can just import directly.

1 Like

Oh wow, so this has been happening for more than 2 years now… I’m on 2020.3.26, I noticed on your changelogs the updated versions have compatibility for 2020.3.4 and 2020.3.32, maybe the Unity Editor version I’m using refuses to download the newest build because of this? Not sure, but I’ll have to send you an email as deleting the folder and restarting Unity did not work for me.

Thank you for the help as always

Hi, I just started using this asset and I’m enjoying it so far, but I’d like to use it with Playmaker since I’m not so good at scripting. Unfortunately, every time I install the Playmaker integration package under the extras folder I get errors that prevent me from playing the game.
For example:
Assets\DestroyIt\Extras (safe to delete)\PlayMaker\Actions\RepairDestructibleObject.cs(29,75): error CS1061: ‘Destructible’ does not contain a definition for ‘totalHitPoints’ and no accessible extension method ‘totalHitPoints’ accepting a first argument of type ‘Destructible’ could be found (are you missing a using directive or an assembly reference?)

There are 3 other error messages that are the same but “Destructible does not contain a definition for ‘currentHitPoints’” and the same two errors but for DestroyDestructibleObject.cs.

Has anybody else encountered this issue?

Hi @BrandenU ,

Sorry you ran into that issue. It happened because I changed a couple of variable names in the main DestroyIt package, but forgot to update the PlayMaker integration package. I’ve already corrected this on my development copy of DestroyIt, but haven’t submitted the change to the Asset Store yet, since it was so small.

Please try importing this unity asset package, which will replace your PlayMaker integration files and fix the variable naming issue:

Please let me know if that doesn’t fix it for you.

Hello,

Have you tried DestoryIt with the V3 versions of the Opsive Character controllers?

I just saw the Edy’s and Destory It video above, so good

I haven’t tried V3 of the Opsive Character controllers yet. It looks like they just came out (Mar 16, 2023)? I checked and I only have the V2 version right now.

It looks like a major release, though. Lots of changes/enhancements:
https://opsive.com/news/character-controller-version-3-features/

It was released late last year but is finally becoming stable, all the integrations are done and all but one of the addons are done. It was a rewrite of the asset. You should message the dev and see if you have get a copy of v3 to update your integration, if you have the time of course.

1 Like

Hey Zangad!

I’m having an issue with re-parenting a child of the destroyed prefab so that I can get the same results as in the demo scene of the sword handle being seamlessly re-parented to a hand.

8939124--1226043--upload_2023-4-10_22-29-47.png

I have my destroyed prefab as the Destroyed Chair, which holds all these children.
8939124--1226046--upload_2023-4-10_22-30-44.png
I only want to re-parent the Chair Leg to the player’s hand but the Destroyed Chair parent from the prefab also gets parented to the player’s hand. Is there any way to avoid this and also retrieve child game object from the instanced prefab (as soon as it spawns without getting the child from the Melee Holder) so that I can control what to do with it?
8939124--1226052--upload_2023-4-10_22-42-13.png

Thank you!

Hey @EpicMcDude ,

That’s really strange, I’m not sure off the top of my head why that would be happening. I’d like to take a look at it and see if I can reproduce the issue on my end.

Is there a way you could send me a unitypackage of your pristine and destroyed chair? You can select both prefabs in your project and then right-click one of them and choose Export Package.

8939508--1226106--upload_2023-4-10_20-52-23.png

On the next dialog, make sure to check Include Dependencies.

8939508--1226112--upload_2023-4-10_21-0-50.png

Then just send me the resulting unitypackage. That should give me something I can import into my project to see if I can reproduce the issue. You’re also welcome to just send me your whole project if it’s not too big (zip it up at the root folder level, and you can delete the /bin, /Library, and /Logs folder to save space, then upload to a cloud hosting service and send the link to modelsharkstudio@gmail.com).

Thanks for the quick reply! I was testing stuff and I’m sure I misunderstood its purpose as It’s doing what it’s suppose to do.
I was trying to make the Chair Leg a child of the Assigned Parent object, but that option is for re-parenting the whole destroyed prefab object, not what I wanted.
I was thinking the “Debris to re-parent” would be what child object, out of the destroyed prefab, would be made a child of the Assigned Parent, so that’s my bad.

Would you know how I could get a reference to a child object of the instantiated destroyed prefab as soon as it spawns so that I can re-parent that instead of the whole destroyed prefab?

EDIT: I figured it out, I’m doing some stuff I wanted to avoid but it works.

1 Like

I have strange issue - I cannot select the level of visual damage when I use my own materials with name/suffix “-ProgDamage”. Is it because my material is not in DestroyIt folder?
8973238--1233751--upload_2023-4-25_21-48-24.png
in my material I only added detail mask and secondary normal map - and visual damage works but I cannot edit showed above greyed column

ok - I missed filling secondary map - detail albedo - I missed it because efect was still visible - just in script only the whole column was not editable

1 Like

Hi @dulinieck ,

Thank you for letting me know you got it figured out. Yes, if you’re missing the Secondary Detail map, it won’t let you edit those values. I’ll look to see if there’s a tooltip or something I can add to the inspector script to make it more clear that a Secondary Detail map is required for editing.

do you plan to add any i.e. simplified version of “pre-fracture generation” ?
I assume that for now I need to use external tool i.e. Open Fracture (or blender but it is outside unity) to create “fractured version” of my destructible objects.

Hi @dulinieck ,

No, not at this time. While I would like to add a pre-fracturing feature to DestroyIt, I haven’t found a way to add something I think customers would find acceptable in quality. I tried to add this feature in the past, using an open-source 3D Voronoi fracturing C# library. However, I quickly ran into issues with even mildly complex geometry. Here’s the post where I [go into more detail]( https://discussions.unity.com/t/540859 page-2#post-1865337) if you’re interested in what I’ve tried and what I discovered.

The problem is, it would require a lot of effort to recreate this feature, which already exists for free with Blender. Not only that, but Blender (and other fracturing assets) already solved most of the challenges with fracturing meshes. So there are years of refinement with Blender’s fracturing feature, making it a better tool than I would be able to create on my own. For example, Blender has a grease pencil that lets you draw custom patterns and fracture the mesh based on the pattern. So you could draw concentric circles with the grease pencil and get a very realistic broken glass effect with a spiderweb fracture emanating from the center in rings.

The only benefit I can see of adding this feature to DestroyIt is the convenience of not needing to use an external tool. I admit this is a big benefit, and I would like to add it someday, but so far I haven’t seen a way to make it feasible from a development standpoint. If you know of a script/library/API that works (it needs to be open-source, or available to use for commercial purposes), I would definitely be willing to take a look at it. I get a lot of requests for this feature, so I’m always on the lookout for a way to make it happen. :slight_smile:

1 Like

Unity version 2021.3.24f1
Playmaker ver 1.9.6
DestroyIt ver 1.15

Get this error and oters after adding the destroyit playmaker package.
Playmaker is installed

Assets\DestroyIt\Extras (safe to delete)\PlayMaker\Actions\RepairDestructibleObject.cs(29,48): error CS1061: ‘Destructible’ does not contain a definition for ‘currentHitPoints’ and no accessible extension method ‘currentHitPoints’ accepting a first argument of type ‘Destructible’ could be found (are you missing a using directive or an assembly reference?)