How to implement attachments

In this tutorial, we will cover how to influence recoil on the fly.

Overview

To modify the current recoil animation, PRAS has the Input Scale feature using these methods:

Input Scale methods.
  • Scale Input: applies an Input Scale.

  • Unscale Input: reverts an Input Scale.

  • Reset Input Scale: resets any applied modifiers.

Input Scale is a struct that includes these properties:

Input Scale properties.

Use-case

When attachment is equipped, make sure to update the current Input Scale:

How to scale recoil.

To revert changes of the previous attachment:

How to revert recoil scale.

Last updated