
We will put your suggestion on our backlog and try to get it in with the next release, pending any issues.
DESTROYIT REALISTIC FPS PREFAB UNITY UPDATE
The only breaking changes would be to customers who have (A) already written a lot of custom DestroyIt code for their game - in which case we will warn them that they should not update their DestroyIt version, and (B) anyone who is taking advantage of the DestroyItReady stubs to create and sell their own DestroyIt-Ready models.īut I don't think either of these is a deal-breaker, and it does make DestroyIt more compatible with other FPS packages. But it seems like a pretty straight-forward and minimal impact change for customers.

Other than that, we would just need to do a lot of regression testing before releasing it. There were a few warnings about "loss of precision", and in a few places we're doing comparisons to zero, so I'll need to convert those to Mathf.Approximately() comparisons. I took a look at it, and was able to convert DestroyIt to use floats for damage in about 30-40 minutes and there were no obvious breaking changes. But we think it's a great feature, and we'll add it to the asset as soon as we can work through the details. In addition, the ResetPrefabs would need to be auto-pooled like the destroyed prefabs currently are, for performance.Īs you can see, there are a lot of considerations to make this fit cleanly in DestroyIt.

Particle effects would also need to be reset. If Reset() is called on a Destructible object with no assigned ResetPrefab, then the original gameObject would be reset and re-activated. The DestroyIt code would need to be re-worked so the Destructible object and script always remain in the game (currently, they are removed from the game and replaced with the destroyed prefab, which has no knowledge of the original it came from).ĭestroyed prefabs would spawn in parented under the Destructible object when destroyed. There, you would assign the prefab you want to reset it to whenever Reset() is called on the object.

The way I see this feature working is, we would add a ResetPrefab field to the Destructible script. I've bumped up the priority since you are the second customer to ask for this feature. Put this on your object at the same level in the hierarchy as your Destructible script:Ĭlick to expand.The ability to reset a destroyed object back to its original prefab is already on our backlog. Here's what I put together that (I think) gives you the effect you're looking for. Using a script like this would allow that to happen automatically. For example, if the car slammed into a wall head-on at 150 mph, you might want an immediate destruction effect instead of a delayed one. Using a hit point monitor like this also gives you the option to have cars explode immediately if they take so much damage they bypass the timer and go straight to 0 hit points. That way it immediately explodes and flies apart when the destroyed prefab spawns in. To get the big finale explosion, set your destroyed prefab to a dismantled car with the explosion effect attached to it. Once its hit points drop below a certain point-of-no-return value, it starts a timer that continuously does damage to the Destructible object until it is destroyed.

If that's the effect you're looking for, the easiest way I can think of to do it is to add a script to your Destructible object that monitors its hit points. Would it be similar to how in many FPS games, you shoot a red explosive barrel, and once it takes enough damage, it catches on fire and explodes after a few seconds?īack to your race car example, the car would get wrecked enough that it's considered totaled, then catch on fire and smoke, until several seconds later it finally explodes. I think I understand what you're asking for.
