Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by aiibee · Nov 16, 2012 at 02:23 PM · animationcameraguitexturetrigger

Path Trigger Animation

I will get straight to the point.

I got a camera, Tunnels, Objects with different Texturesand GUI Menu.

On the GUI menu question will appear with Answers. When the player has answered a question

a. It will change a texture of an Object or b. it will trigger an animation and translate the camera to a different location.

Question:

How to I set up something like this?

I know its a lot, but any help would help.

THANK YOU ALL UNITY users/:)

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by FakeBerenger · Nov 16, 2012 at 02:54 PM

If there is a single path and only one solution to go from one point to another, you can use regular animation. If you can travel from several points at a time, you need 4 animations for each : with ease in/out, in, out or none.

Else, like if you have 4 points A, B, C and D and can do A->B, A->C or A->D (etc), doing animations for each will be very long and, in my opinion, clumsy. You should use waypoints as path. For a simple solution, you can travel linearly between those waypoint. If you have more time, try to implement bezier curves.

Comment
Add comment · Show 3 · 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 aiibee · Nov 17, 2012 at 07:44 PM 0
Share

ok, I am not sure how to create these curves in unity, i am new to this. What I want to to is. There is 3 points the camera will travel to. A-B, B-C, C-D there will be 3 question given, if player answers all 3 question correctly, the Camera will travel from A-B. if player answers question incorrectly at stage B, the camera will travel back to stage A.

Also when the camera travels to stage B, it will remain there till the player hans answered the questions.

How it makes sense to me is, to create the animations al in $$anonymous$$AYA or unity. a animation that travels from A-B, and a static animation ( Stop) or would that be code ???
what I am trying to say I will have 3 different animations.

I just don't understand how I would set this up >?? HELP NEEDED

avatar image FakeBerenger · Nov 18, 2012 at 10:52 AM 0
Share

Yep, you're on the right track. What you want is simple enough to forget what I said about curves. Let's stick with animations.

Doc for animation : Script and view.

So, first, open the Animation view (view->animation) and select your camera. Create an animation with a clever name (eg : AtoB), create the keys for position and rotation at frame 0, move the timeline to another frame (you can move it later, if you think it's too fast / not fast enough) and move your camera from A to B, and make sure it looks great => Unity will record it. Then do the same for B=>C. Unless you want B=>A to look different, you can just play A=>B backward.

Then, in your script, when the player answer correctly, do this on a script attached to the camera (or elsewhere with a reference on the camera animation's component) :

 animation.Play( "AtoB" );

And that's it, no need for a static animation ! $$anonymous$$ake sure your animations wrapmode is set to once though ...

avatar image aiibee · Nov 19, 2012 at 03:03 PM 0
Share

Sweet, What I have done now is:

I have made 6 Animation which are attached to the camera.

Animation AtoB Animation B Static Animation BtoC Animation C Static Animation CtoD Animation D Static

i am guessing in my script I have to:

//Tell the Camera to play "AnimationAtoB" automatically when game starts //When Camera travels to destination B, it will need to trigger "Animation B Static" till the questions are answered and depending on the outcome, it will trigger "Animation BtoC" and the same with the rest.

Is this right ??

Also, how do I play my animation in revers, if i wanted to go back >??

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

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Game Texture - Always Face Camera 1 Answer

My GUI elements are not rendering on top of all cameras. Any ideas why? 1 Answer

Camera.main.WorldToViewportPoint & GuiTexture 2 Answers

My GUI Texture Disappears? 0 Answers

Apply Render Texture To GUI + Transparency? 2 Answers


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