- Home /
making a chair animate float and fall
I created a animation where a chair lifts up the topples over and I'm trying make a script that when u enter a box collider triggers the animation
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class chairfall : MonoBehaviour
{
Animator m_Animator;
bool m_chairfall;
void OnTriggerEnter(Collider col)
{
if (col.gameObject.tag == "Player")
{
m_chairfall = true;
m_Animator.SetBool("chairfall", true);
}
}
Comment