Search Unity

How to make a character do a really high jump with Mecanim?

Discussion in 'Animation' started by QuinnWinters, Feb 14, 2014.

  1. QuinnWinters

    QuinnWinters

    Joined:
    Dec 31, 2013
    Posts:
    494
    I've been learning mecanim recently and I'm getting to where I know what I'm doing with it pretty well, but I'm having a problem. Every jump animation that I've tried - and I've been through dozens - only takes the character about a foot off the ground, literally no higher than their ankles. This will not do for a platformer where I need the character to jump at least its full body height.

    I've attempted editing a jump fbx animation to make it go higher, with motionbuilder, and I can't seem to get the entire body to move a great distance higher without moving limbs into awkward positions.

    I'm wondering if perhaps there's something I'm missing in mecanim itself that would allow the character to jump higher - or do I actually need to edit the fbx animations to make them reach a full platforming style jump height?
     
  2. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,620
    I believe you're missing gravity that's applied to the Animator component, and/or the root motion/baking controls available on animation import. Alternatively you may be able to change the gravityWeight curve of the animation (the only place this is documented is in a video).

    By default the animation controller's object will have gravity applied seemingly whenever it doesn't think the animated object is touching the ground. To be honest I'm quite confused as to why it's done this way, as the methods available to manage it are scattered and we already had ways to add gravity to objects if we wanted it.