Camera & Weapon States
Description
The Camera States and the Weapon States are two data types in FP Motion. Their primary purpose is to keep the State Data for all the player’s states and serve as a point of access to it.
How does it work?
These two scripts don’t actively perform any changes to the asset, and their primary purpose is to store data.
To make changing data on the fly easier for you, and to have it centralized, it is necessary to create Scriptable Objects from these two types, and use them.
How to create a State file
To create a file, you can follow these steps:
Right-Click the project panel or click ‘Create.’
Find the FP Motion sub-menu, and click on it.
Two options are inside the Camera States and the Weapon States, these will both create a file.
Usage
To use a state file, no matter which one, the State Handler needs access to it.
When using a weapon state file, you can give the State Handler access to it via the Weapon component, as it contains fields for both the camera’s and its state files.
The reason the Weapon component has a variable for the camera’s states is to allow you to override camera states based on the weapon in-use.
You can change the camera’s state file by accessing the State Handler, as it contains a field for the file.
Last updated
Was this helpful?