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 jheffel · Nov 13, 2011 at 11:56 PM · speedlocomotion

Variable walking / running speed with locomotion system

I'm working on an animation control scheme for a set of characters with the ability to blend in different emotions for different walking styles and speeds. I have a working version that I use to test it where it walks in place with a scrolling uv floor, and it works if you move the character through the world as well.

I want to use the locomotion system with the characters as a way to get rid of foot skating, and add the ability to go up stairs, walk on rough terrain etc.

So far I've just copied my control script along with the locomotion system and modified my script to be driven by the speed of the character controller. I then calculate the desired speed of the character based on a base speed and the emotions it currently has displayed.

----PROBLEM (if you dont want to read the preamble ;) )----- I speed up the movement of the character controller so my character is moving at the right speed, I also speed up the playback speed of my run and walk animations that effect the upper body. The problem is even though the character is moving faster I think the locomotion animations are playing at the same speed so it just takes larger or shorter steps. The result of this is that the upper body comes completely out of sync with the lower body and creates a very unrealistic walk cycle.

/PROBLEM

Any ideas how i can speed up the animation speed of the lower body? All of my scripts are in JS and the locomotion system is in C# i think.

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
1
Best Answer

Answer by syclamoth · Nov 14, 2011 at 12:02 AM

I don't understand the problem here- the locomotion system always tries to make strides of the correct length, so if your animations are not appropriate for the speed your character is moving, it will always look silly! If the walk and run animations also affect the upper body, you shouldn't be manually changing them- the locomotion system manages all of that.

Basically, if you could speed up / slow down the lower body stuff, you would be preventing the locomotion system from doing its job. You need to make some more animations for your character, that are more appropriate for the speeds you will be going at.

Comment
Add comment · Show 5 · 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 syclamoth · Nov 14, 2011 at 12:03 AM 1
Share

Also, there is absolutely nothing forcing you to use the locomotion system's inbuilt character motor. You can move your characters around however you like.

avatar image jheffel · Nov 14, 2011 at 12:24 AM 0
Share

I get what your saying, and what i want to do may not be possible with the locomotion system. Basically the way I have it set up in my existing scene is that I have my 'base' speed (the optimal speed as calculated by locomotion) and then I am applying different emotions on top - ie if they are angry I apply the angry animations on top, and speed up the walking speed, if they are sad i slow it down etc. So I am modifying the playback speed of the walk and run cycle as well as how fast the character moves in the world.

Ideally I would like to be able to go to the motion group in the locomotion system and just change a .speed attribute of both my walk and run animations, but then i guess it would have to reinitialize.

as far as the character motor, I'm just using that for testing but I have another movement script that I'll be using for the final implementation.

avatar image syclamoth · Nov 14, 2011 at 12:45 AM 0
Share

Well, as I've said, the entire point of the locomotion system is that it automatically changes the speed of your animations to fit with the speed the character is moving. You might want to set up several different motion groups on the leg animator, and blend between those for your variants.

avatar image jheffel · Nov 14, 2011 at 01:12 AM 0
Share

Ah starting to make a bit more sense for me - i just keep getting distracted with all the small details I have to worry about in my script so its hard to see the big picture.

I'll try setting up some motions groups at different speeds.

Thanks for your help, sorry it took a little while to sink in :)

avatar image runevision ♦♦ · Nov 14, 2011 at 05:31 PM 0
Share

Not sure if I understand completely, but the way to make the animations go faster or slower that doesn't interfere with the Locomotion System is to just actually make the character move faster/slower. Actually I can't remember if going faster than the base speed will only make him take longer steps or also speed up, but for slower than base speed I know it's using a combination where the steps become both shorter and have longer duration. But yeah, setting up more motion groups is the most flexible solution.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

how to slow down speed increase? 2 Answers

How To: spawn succesive waves of enemies increasing their speed 1 Answer

question about score counter 1 Answer

speed diffrence 0 Answers

How can I increase the speed of the player when they run into an object? 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