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 babji3 · Jun 28, 2015 at 01:13 PM · c#animationanimatorjump

How to Rotate Cube When jump?

Hi All, I want to rotate a cube when i'll jump. What i want is ,i created rotate animation for cube in unity like this (0-180) and (180-360) degrees.The animation has 3 keys obviously. when i press mouse button jump is happen, at that i want to rotate the cube 0-180 degrees animation and land the cube. Again when i click mouse button the 180-360 degrees animation should be apply and again land the cube . I think it make sense to understand. For first time jump 0-180 deg animation should apply ,for second time jump 180-360 deg animation should apply. Thanks

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 DiegoSLTS · Jun 28, 2015 at 02:08 PM 0
Share

So, what have you tried? Did you at least manage to trigger one animation? Do you have an animator controller with the states and transitions? Do you know how animator and trigger parameters work?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Inok · Jun 28, 2015 at 07:44 PM

If i undestand right you need system that synchronise start of jump with start of needed animation? Ok first you need to split animation on 2 independent Splitting Animations. Then you build animation state tree with 2 states that contain 2 splitted animations. Add to transition conditions of each transition between 2 states trigger animation parameter then in script where you start jump write: animator.SetTrigger("name of trigger paremeter"); (where "animator" is reference to your animator component instance).

This variant maybe not ideal but can give you idea how it can be achieved.

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 babji3 · Jun 29, 2015 at 05:29 AM 0
Share

What i have to do, i have to split animation in to two states? first is 0-180 and 180-360. For first jump i have to call 1st animation state for second second animation state?

avatar image babji3 · Jun 29, 2015 at 05:40 AM 0
Share

alt text

example.jpg (35.2 kB)
avatar image babji3 · Jun 29, 2015 at 08:21 AM 0
Share

How should i work this one?

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

How can i use the Animator in script to find when animation clip finished playing and then stopping the animation ? 1 Answer

Conflicting Animator SetTrigger 0 Answers

Set boolean to false when animation changes? 1 Answer

pause Animation 0 Answers

Is it possible to always make animations play differently? 0 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