I'm trying to change camera angle based on Animator state. For example having a zoomed angle when Player plays angry animation and etc...
I tried to edit "DefaultCameraAngle" script by adding these codes:
Code: Select all
void OnConversationLine(Subtitle subtitle)
{
if (GetComponent<Animator>().GetCurrentAnimatorStateInfo(GetComponent<Animator>().GetLayerIndex("Dialogue")).IsName("NoDialogue"))
{
cameraAngle = "full";
}
if (GetComponent<Animator>().GetCurrentAnimatorStateInfo(GetComponent<Animator>().GetLayerIndex("Dialogue")).IsName("sad"))
{
cameraAngle = "medium";
}
if (GetComponent<Animator>().GetCurrentAnimatorStateInfo(GetComponent<Animator>().GetLayerIndex("Dialogue")).IsName("angry"))
{
cameraAngle = "close";
}
}
So I wanted to know if there is a way to change Default camera angle value before sequencer run it.