Shooting

Shooting is the action or practice of shooting with a gun.

Description

We designed the Shooting effect to add recoil procedurally to the player's guns when shooting, doing the work that a shooting animation would usually have to do. This component makes the guns move back and rotate up to simulate a gun firing.

How does it work?

This component works by using Events to know when the player is firing, and whenever the player fires, it adds a position and a rotation force.

It then takes these forces and multiplies them by the corresponding State Data multipliers before finally passing the result to the Handle to apply them.

Tweaking the effect

When changing what this effect looks like there are two variables that you can adjust, those being the position and the rotation; These two fields are of Vector3 type, and decide the direction in which the forces get applied, and the amount of it that gets applied.

We included Spring Data that affects the position and the rotation of this effect as a field to customize to your liking, and with its help the effect can look a lot of different ways.

As with any other effect, you can find a multiplier for it in the State Data for the player’s current state, as always we multiply the forces in this component by the multipliers in the State Data before applying anything.

Last updated

Was this helpful?