[Bug]? Destructible uses wrong values when spawning Explosion object

smoco

New member
1. Third Person Controller
2. Unity 2021.2.2f1
3. Destructible class uses wrong values when spawning an Explosion object
4. Code examination

I've just started using the Third Person Controller and am walking through the code to understand how Explosions and DamageProcessors work.

It seems to me that line 335 of Destructible is incorrect:
Code:
explosion.Explode(m_DamageAmount, m_ImpactForce, m_ImpactForceFrames, m_Originator);
should be:
Code:
explosion.Explode(m_Originator);

As it currently stands the values that have been set for the Explosion will be overridden by the values set on the Destructible.

Apologies if I have misunderstood something with how this is supposed to work. Basically I want a missile that does a small amount of damage to the target it hits but then generates a large explosion that creates a lot of damage.
 
As it currently stands the values that have been set for the Explosion will be overridden by the values set on the Destructible.
This is currently by design, though I have gone back and forth on it. Since the Destructable spawns the Explosion it should override the values of the explosion. If the explosion is spawned independently then it will use the prefab values.
 
Top