Last updated: Sep 7, 2022

Introduction

The Grip script is something that we place as a component on every weapon’s grip attachments, and that allows us to specify some information about each of them.

It is very important that each grip attachment has this component attached to it so we can recognize it as such, and use it to define what animations to play when using it!

You can find the Grip script ****at this path: Assets\Infima Games\Low Poly Animated - Modern Guns\Demo\Code\Attachments\Grip\Grip.cs

Fields Serialized

Grip Index. Index value applied on the character’s Animator to determine which grip animation pose to apply.

When adding new grips, new poses have to be added to the Animator, otherwise weird issues may happen. This is, of course, unless these new grips use the same index as the old ones.

Functions

Get Index. Returns the value of the Grip Index variable. We basically have this function with the sole purpose of acting as a getter for that value.