public struct ExplosionParameters
This nested type resides in ExplosionCreator
[System.Serializable]
A structure with all information necessary for an explosion. This is used by the ExplosionCreator
.
Fields
public uint FragmentationRayCount
The amount of fragmentation rays. These rays are fired from the center of the explosion, evenly spread in a circle. This value usually ranges from 16 to 64.
public Vector3 Position
The center of the explosion in world space.
public float Range
The maximum range of a fragmentation ray.
public float FragmentForce
The amount of force that is applied to objects hit by fragment rays.
public bool CreateParticlesAndSound
When true, the explosion will create VFX and sound.
public EffectSize EffectSize
Determines the VFX to use
public float DismemberChance
The chance from 0.0 to 1.0 that a limb hit by a fragmentation ray is cut off.
public int BallisticShrapnelCount
If this value is more than 0, the explosion will emit "shrapnel". These are just bullets but they will never draw a tracer.
Properties
public bool LargeExplosionParticles { get; set; }
[System.Obsolete]
Deprecated. Use the EffectSize
field instead.
When true and CreateParticlesAndSound
is also true, the created effect is that of a large explosion. This has no effect on the actual explosion.
Methods
public (constructor) ExplosionParameters(uint rayCount, Vector3 pos, float range, float force, bool createFx, bool big, float dismember = 0, int shrapnelCount = 0)
[System.Obsolete]
Deprecated. Use the other constructor instead.
Constructs a structure with all information necessary for an explosion
public (constructor) ExplosionParameters(uint rayCount, Vector3 pos, float range, float force, bool createFx, EffectSize effectSize = EffectSize.Medium, float dismember = 0, int shrapnelCount = 0)
Constructs a structure with all information necessary for an explosion