- Home /
Question by
MontyMomentum · Jun 24, 2020 at 08:31 AM ·
animationanimator controllerparameters
Player freezes because of Animator
My player has an Animator and to another object I've attached a scrip that would set the animation parameter to true. The controller has a default state and the transition has the correct parameter with Exit Time enabled.
Link to picture of my Animator: https://drive.google.com/file/d/1iqqRljh1L0nFovyr0D8HoQYHyXffvDke/view?usp=sharing
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayAnim : MonoBehaviour
{
[SerializeField] private Animator MyAnimationController;
public GameObject Player;
public string Parameter;
private void OnTriggerEnter(Collider other)
{
if (other.gameObject == Player)
{
Debug.Log("Animation start");
MyAnimationController.SetBool(Parameter, true);
}
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613001650im_/https://answers.unity.com/themes/thub/images/avi.jpg)