Why do the states change?

erdjei

New member
Hi!
Sorry if this is a stupid question, but I puzzled over it for the long time. Why do the states change?

For example, we have a camera state "AimSniperRifle" in the demo, and I cannot find any reference to this state outside the camera controller script. How this state is becoming active? Which component is initiating camera state change?

Thank you in advance.
 
You have an Aim item ability on the CharacterLocomotion component on your character. The Aim item ability has a state name string, usually "Aim". It also has a check box called something like "append item name". So when sniper rifle is equipped and you aim, the AimSniperRifle state is set, allowing you to add presets to any component that accepts state presets, such as the camera controller
 
Top