• 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 GTX Titan · Oct 29, 2014 at 04:03 PM · animatormecanimplatformerroot motion

Can I make character movement entirely with Mecanim's root motion?

I'm designing a 2.5D platformer for school project. I already have utilized root motion for moving on x axis but struggle with getting y-axis root motion to work properly. My idea was to animate falling, jumping, ledge grabs, ledge idling, wall sliding, wall jumping and basic running with root motion only without scripting it. I just set parameters in script for the animator. So is this possible? And if so do I need rigidbody2D for the character gameobject?

Comment
Add comment · Show 8
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 christoph_r · Oct 29, 2014 at 04:34 PM 0
Share

Basically, yes, this is possible. You would most likely need to create two movement state machines, one for climbing and one for regular locomotion. The movement itself would then be applied via root motion (if you set it up correctly, that is). "Just setting parameters for the animator", however, isn't as trivial as you make it sound, especially climbing does require quite a bit of effort to get right when to feed which parameter to the animator.

avatar image GTX Titan · Oct 29, 2014 at 05:20 PM 0
Share

So the rigidbody isn't necessary unless I do some kind of ragdoll at some point?

As for the climbing, I'm only gonna add ledge grab and climb up while hanging on the ledge... Not necessarily ladders or anything like that.

avatar image GTX Titan · Oct 29, 2014 at 05:32 PM 0
Share

I just fiddled around and noticed collisions would be a porblem. How do I make the player respect physics without gravity being applied?

avatar image GTX Titan · Oct 29, 2014 at 05:40 PM 0
Share

For the ledges I use colliders ongameobjects with tag "ledge" to trigger grab animation. Only problem so far is y-axis motion up and down. I have falling animation that has the root motion for falling down and a jumping animation that has root motion for up. gravity makes my jumps fall short and falls stretch too long.

avatar image christoph_r · Oct 29, 2014 at 06:43 PM 1
Share

You'd need a character controller so gravity would have an effect. This also conveniently lets you check if the character is grounded, allowing you to play a fall animation if it's not.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

27 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

Related Questions

How does the Animator drive Rigidbody with root motion (in detail)? 0 Answers

Using root motion scripting for specific animations 1 Answer

Animations blending in weird way (maybe something to do with root motion?) 0 Answers

Moving Character to exact position using animation. 0 Answers

Apply Root Motion with Animator and Animation Made INSIDE Unity 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges