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 /
  • Help Room /
avatar image
0
Question by Riderfan · Dec 09, 2015 at 03:54 AM · animatorblendtreesprinting

Blendtree's help please

Hello.

I'm at the stage of my project where I need to improve the character animator to add missing locomotive animations, and I am confusing myself with the various tutorials. I've been fnding a lot of tutorials that show how to use a blend tree to change animations with speed (move from walk to run and back) or play animation variations for direction (turning slightly to the right or left). But my character's 'turn' animations are not looped. When my character is sprinting and he needs to make a 180deg change of direction, he needs to run the 'plant and turn 180' animation, then pick up running in the new direction. I've not found any tutorials that are helping with that.

I'll explain a bit of the setup, then get to my question...

My animator currently has the following setup. alt text The 'Locomotion' state is a blend tree (that has other blendtrees). The Getups and Backpedal are unimportant for this discussion.

Locomotion is a blendtree that handles all the base movment, idle, walk, jog, run, sprint. A Speed variable is used to transition between these. Each of these blendtrees is made up of other blendtrees that manage directional changes. My directions are in degrees. So I have a Sprint Forward, Cut45, Cut90, Cut135, and Cut180 (for both left and right). These are not looped, once the character makes his 45deg cut, he should be pointed in (more or less) the right direction and just pick up sprinting. The small adjustments to get him exactly in the right direction shouldn't invoke an animation change.

The sprint portion is below. alt text

Anyway, now I'm finally getting to my question.

The character is given a waypoint in the world and a speed to get there.

  • What's the best way to determine the angle required to turn?

  • How do I stop the animator from looping the cut animations. For example, if the determined angle is 180 degrees, the animator just loops that animation over and over again. When I try to adjust this in script, the angle towards the target lowers (because the character is turning as part of the animation) and the animator wants to kick into the other cut animations. For example, as the angle reduces from 180, the animator then wants to play the Cut135, then the Cut90, etc... it shouldn't actually do that, it should play the 180 until the character is turned around, then it should just revert to sprint until he needs another hard cut.

Am I going about this the wrong way? Hopefully what I'm asking makes sense.

animator.jpg (123.9 kB)
blendtree.jpg (511.4 kB)
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 kingjavo · Jan 01, 2017 at 03:29 PM

Did you every figure this out? I'd love to know how you accomplished this task.

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

34 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 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

Animation sinks player into the ground 1 Answer

Create Idle/Walk/Run Blendtree 1 Answer

How to prevent colliders animating between animation states? Also prevent rotation on x axis of blend tree. 0 Answers

how to restart mecanim state animation or play it from random position [SOLVED] 0 Answers

Extending tangent length 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