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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
I have my destroyed prefab as the Destroyed Chair, which holds all these children.
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?
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.
On the next dialog, make sure to check Include Dependencies.
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.
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?
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
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.
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.
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?)