Forum rules - please read before posting.

Jumping issue with character in AC

Hi, I recently started using AC to make a 3d adventure game. I am an animator and story artist, but not a programmer and my skills there are quite limited, thus the benefit of using AC. I am somewhat familiar with Unity though, but certain things still stump me. I've been working on my own game in my spare time.

So I am having an issue when the character jumps, his capsule Collider is popping up and then also popping down after the animation is over. Also he sometimes freaks out and jumps continuously, but the issue I can't figure out is why he snaps up. I am unsure if this is a mecanim thing or something I need to tweak in AC?

I created a video on youtube that demonstrates the problem. Hopefully that will help visually explain what I am referring to.   

I'm sure this is a simple fix so thanks to anyone who can help out!


Comments

  • Superb animation!

    I think this is likely to do with the fact that you're relying on root motion.  Test out the demo game's player prefab, Tin Pot, by using him in your Settings Manager's Player prefab slot - see if the jumping works for you then.

    If so, it may be that you need to jump without using AC's jump code, which I think may be fighting Mecanim, since Mecanim's also trying to make the player jump purely through animation.  Let me know the result, and we'll take things from there.
  • Hi Chris, thanks for the compliment and also for commenting back so soon!

    I tried TinPot and he worked nice and smoothly jumping and moving around etc. I saw that TInPot was set up as legacy animation type so I wonder if that is a factor? I tried all different variations with my character and still had the issue. I tried another character set up for Mecanim (that I didn't build and rig myself), more human proportions, and with the jump it was even more pronounce for a snapping up and down. Maybe it is a mecanim thing?

    This may only be a problem only when the character is moving in Y space perhaps?? I also have some climbing up and down stairs animations I've been impelmenting and noticed a similar type of issue, but it may not be the exact same thing. Just a thought as I can't seem to figure it out.

    I will have more time over the weekend to experiment. How exactly would I disable AC's Jump code as part of my testing? Thanks again for your help!
  • Was the other Mecanim character relying on root motion?  I think that's the problem.

    To disable AC's jumping, try going to the Settings Manager and reducing the Jump speed slider all the way to zero (it'll be under Movement settings).
  • edited February 2015
    Hi Chris, thanks for the info! I had time to check over everything and I believe I found what the problem might be. I moved the Jump Speed slider all the way down to 1 (could not lower it to 0?) and It still did it, but it did help. I noticed Tin Pots Rigidbody Mass was set to 1000. What I found was that my characters mass on my Rigidbody was only set to 1. I looked into the Unity documentation on rigidbody mass and it stated

    "You should strive to keep mass close to 0.1 and never more than 10.
    Large masses make physics simulation unstable."

    This might not be referring to characters though, but with Jump Speed set at 1, I dialed my characters mass up to around 5 and it works much better. I think the trick was increasing the mass slowly to find a sweet-spot where he still jumps well, but doesn't pop up or float anymore.  If anyone else has this problem I would try that first. Although it could be something else and this is just masking that problem, for now I think this works well though. Thanks man!

  • 5 years later and this solution still work.. Thanks shawneclark

  • If you're having trouble with something @Adam, please create a new thread with details.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.