I’ve read about a dozen variations of this question but none seemed to have the solution I’m looking for. I’ve an animated platform I’ve created and animated in Max and it plays perfectly in Unity if I check the Play Automatically box.
I’ve unchecked the play automatically box, created a box I’ve marked “Is Trigger”, made it a child of the platform I want animated but clearly I’m missing something as nothing happens.
What I want to happen is when the player character (3rd person) moves into the Trigger Box, it sets the animation of the platform to play.
Any additional tutorials or script help would be appreciated.
Ok I got it! I had the trigger set to Trigger instead of Animate.
It works, thanks for your help!
I just had this problem as a noob my self. Use the activateTrigger script (is in scripts folder) and set it to animation. Pick your source(player) and your target (door). Attach the script to your trigger object and uncheck animate Automatically box.
Works for me.
Thank you, that’s what I was missing! I never imported the Standard Assets.
So I’ve set it up but still no luck. Here’s what I’ve got:
-An object I imported from Max with animation called ElevatorPlat (I’ve turned off auto play animation)
-A trigger box collider named Elevator Trigger with “Is trigger” checked.
-I’ve added the Activate Trigger script to the trigger box.
-I’ve set the Target to ElevatorPlat
-I’ve set the Source to “Human” which is my 3rd person character
I walk into the trigger box and nothing happens.