Last updated
Last updated
The Camera States and the Weapon States are two data types in FP Motion. Their primary purpose is to keep the for all the player’s states and serve as a point of access to it.
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.
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.
To use a state file, no matter which one, the 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 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.