I have some states in my ChineMachineStateDriven camera where some of the states can’t be directly defined by the animator. So i really want to change camera programmatically in some cases. is there a way i can force change it through code?
Or even better is there a way to ensure that i can base the states on something else?
The StateDrivenCamera is just a switcher that chooses a vcam child based on specific input, in this case the current state of an Animator, because that is a common use-case.
You can write a custom switcher that chooses a vcam child based on any arbitrary input conditions. You can use StateDrivenCamera as a starting template: copy it and modify the part that chooses a vcam.