Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by bwiegele · May 19, 2011 at 10:25 PM · animationtriggerboxcollider

Triggering a basic animation via Box Collider

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.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cregox · Sep 27, 2011 at 07:21 PM 0
Share

You guys are really using wrong UnityAnswers...

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by bwiegele · May 20, 2011 at 12:25 AM

Ok I got it! I had the trigger set to Trigger instead of Animate.

It works, thanks for your help!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cregox · Sep 27, 2011 at 07:22 PM 0
Share

Questions are questions, answers are answers... This should be just a vote up and accepting an answer. No "thanks" need to be written, but you could also add a comment to the accepted answer.

avatar image
1

Answer by Hordak · May 19, 2011 at 10:47 PM

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by bwiegele · May 20, 2011 at 12:20 AM

Hordak,

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.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Hordak · May 20, 2011 at 09:29 AM

No prob :)

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image bwiegele · May 20, 2011 at 04:43 PM 0
Share

Any chance you figured out a solution to the character falling through the elevator floor as it ascends?

avatar image cregox · Sep 27, 2011 at 07:22 PM 0
Share

again, should be just a comment

avatar image bwiegele · Sep 28, 2011 at 01:14 AM 0
Share

Thank you, Cawas, for going through all my posts and typing the same thing over and over. Once wasn't enough. I clearly didn't understand so luckily you did it twice more. You're very helpful! #sarcasm

avatar image cregox · Sep 28, 2011 at 01:45 PM 1
Share

Oh, you're very welcome bwiegele. I know the world revolves around you so I did it only for you - and nobody else. ;)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Presure plate that triggers an animation 1 Answer

An odd iTween+RageSpline animation issue with trigger/collider! 1 Answer

Sliding door animation question. 3 Answers

code to play my animation on button press, but it is looping. What do I add to stop this? 1 Answer

Can I make animations snap to a frame? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges