otzee
New vMember
Posts: 2
|
Post by otzee on Jan 10, 2020 4:37:07 GMT
Hi, I want this object in the scene to trigger an animation inside the character animator. Any ideas? Thanks,
|
|
|
Post by shadex on Jan 10, 2020 6:59:32 GMT
Put a collider on it, check off trigger. Write a OnTriggerEntry script that triggers animator.SetTrigger("MyAnimation"); Then just make a trigger called "MyAnimation in the animator, make a new state with your animation, transition to it from any state, and add the trigger as the condition. You also might want to destroy or disable the collider after the animation is triggered, so your player doesn't get stuck in an endless animation loop, if your using looped aniamtions
|
|