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 apomarinov1 · Nov 26, 2013 at 08:22 PM · animationmecanimturning

After 180deg turn animation, char is at ~160

I have a default idle state, which transitions into an idle which turns 180deg and walks. In the animator the transition from idle to the turn clip works perfect, showing the character blending from idle to turning 180deg and walking, but ingame, when the turn clip is done the character is not facing the opposite way, maybe like 160deg or so. I made sure the blending is over before the actual turn has started.

Comment
Add comment · Show 3
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 Owen-Reynolds · Nov 26, 2013 at 09:18 PM 0
Share

$$anonymous$$ight help if you said how it was set up ($$anonymous$$echanim? Some tracking button checked set?)

Using plain animation (the old system,) animation will never change the actual facing (the blue arrow.) And, it will always be perfectly positioned as in the last frame (unless the blend time is longer than the animation.) So something else is chopping yours short.

avatar image apomarinov1 · Nov 27, 2013 at 04:14 AM 0
Share

Yeah it's mecanim :)

avatar image karlhulme · Nov 29, 2013 at 09:14 PM 0
Share

I thought it was the blending that caused this. So some of the rotation would be lost blending from idle->turning and some more will be lost turning->walking. You've ruled out the first but maybe it's happening in the second transition?

You might want to check out Animator.$$anonymous$$atchTarget. This allows you to specify the exact rotation you want to achieve at a given point during the animation.

Animator.$$anonymous$$atchTarget

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by apomarinov1 · Nov 30, 2013 at 06:16 AM

I guess I`ll answer that because I managed to get what I need. How I did it:

  • I made two sets of clips: one for turning to the right and one to the left

  • Used an AnimationEvent to tell the turn to transition to Walk

The key was that all the clips in the sets had to be "similar" i.e. the first step to be at the same time across all. Then I chose a time for the event. In the clips for turning left I chose a time after the turn and when the right foot is off the ground. For the other set at the same time not the right but the left foot is off the ground, because the clips are mirrored, so I set the event in the next step where again the right foot is off the ground(which makes the clips from this set a little longer), that way both sets could transition to a single Walk.

I used this approach because I wanted the character to turn to the way the camera is facing and keep walking that way. The result was almost perfect with just a little difference in the Y rotation of the character which I correct from script.

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

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

18 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Rotate and run animation difficulties - Please help:) 1 Answer

How to play character turning animation when the camera rotates s certain degree like in fornite 1 Answer

AddMixingTransform with Mecanim 1 Answer

Add more bones to skeleton - vertebraes definition...? 0 Answers

How to create a 2D rig? 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