Unity. Gun component

RayFire Gun component

Using Gun component you can shoot objects, demolish them at Impact point, create Impact Flash, Particle Debris and Dust, dynamically push them and activate.

Single shot can be initiated by public method:
public void Shoot()

Properties group

Axis: Defines local shooting axis of object with Gun component, in case Target is not defined.

Max Distance: Maximum distance to shoot.

Target: Transform component which will be used as target.

 

Burst group

Rounds: Amount of shots during single burst.

Rate: Defines delay in seconds until next shot.

Impact group

Strength: Defines strength of physical push which will get Impact target.

Radius: Defines radius in units around Impact point. Turned off when 0, in this case only Impact target will be pushed.

Damage group

Damage: Defines damage value which will be applied to object with Rigid component.

Impact particles group

Debris: Create particle debris in case of shot in object with Rigid component. Rigid component has to have Debris\On Impact property enabled.

Dust: Create particle dust in case of shot in object with Rigid component. Rigid component has to have Dust\On Impact property enabled.

Impact flash group

Enable Impact Flash: Create object with Light component for a moment at Impact point.

Flash Strength: Defines Light’s intensity.

Flash Range: Defines Light’s range.

Flash Distance: Defines offset in units from Impact point.

Flash Color: Defines Light’s color.

Filters group

Tag: Gun will shoot only objects with picked Tag. You can pick only one Tag.

Layer: Gun will shoot only objects with defined layer. You can define several Layers.