Forum rules - please read before posting.

Jump Bool not working

edited July 2020 in Technical Q&A

I tried all solutions which I found here on the board.

  • I tried a Character Controller but then it tells me that I need to use a Rigidbody for Jumping.
  • I set Gravity to 0
  • I set the Mass to all kind of values
  • I edited the Input/Jump and played with the values there as well
  • I unchecked exit time in the animator
  • I turned root motion off and on
  • I tried transitions from Any State or Blend Tree

My character does everything such as using the Talk Bool or the Vertical movement float but he is not jumping.

Jump animations are from mixamo. I tried already a few of them, none were working.

What else can I try to get the Jump Animation working? When I checkmark the IsJumping Bool Parameter in the Animator then it gets immediately unchecked and when I press Space then nothing happens. When my character falls vertically then it triggers the vertical movement float

Sceenshots:








https://imgur.com/a/tdAYjFV

Comments

  • Unless you rely on root motion, your Player's motion and animation are treated separately. Is the issue that the character isn't physically moving into the air, or that the animation is not playing, or both?

    When I checkmark the IsJumping Bool Parameter in the Animator then it gets immediately unchecked

    Any parameter you list in the Player Inspector will be controlled by AC every frame - so that'll be because it's being set back to that AC that value intends it to be.

    it tells me that I need to use a Rigidbody for Jumping.

    The Console? The input should be registering in that case, at least. After replacing the Character Controller with a Rigidbody, does the Console now report anything different?

    Things generally look OK from the screenshots., but it looks like there's more to the Player Inspector than your screenshots show. What of the other components on it?

    Try temporarily removing the Animator Controller from the Animator component, and make sure Apply Root Motion is unchecked. That will prevent animation from interfering from motion, so that we can more easily isolate the issue.

    It also looks like that your Capsule Collider is going to clip through the bottom - since the Y-centre is less than half of it's height. Set the height to 2, and - along with the other changes above - any difference?

  • edited July 2020


    What of the other components on it?

    I added as components an Eye Controller which is included in LipSync Pro from Rogo Digital and the Love/Hate Asset of PixelCrushers.

    And I use a physics asset called Magica Cloth on my player.

    I replaced now even the model with a new version of him tried it again but he still can't jump.

    Try temporarily removing the Animator Controller from the Animator component, and make sure Apply Root Motion is unchecked.

    It also looks like that your Capsule Collider is going to clip through the bottom - since the Y-centre is less than half of it's height. Set the height to 2, and - along with the other changes above - any difference?

    I edited the Capsule Collider as you recommended and I turned off root motion. He "walks" then in T-Pose through my level but unfortunately, it didn't change anything.

    The Console? The input should be registering in that case, at least. After replacing the Character Controller with a Rigidbody, does the Console now report anything different?

    Yes, when I use the Character Controller then the Console shows a message that Jumping would only work with a rigid body.

    I replaced the Character Controller also with a Rigid Body, please see the screenshots above but nothing has changed. The console doesn't send then any message, like everything would be ok.

    I tried also to add a rigid body together with the character controller as component to my player. He falls then through the terrain, even when I activate "Ignore Gravity", so activated then the Y freeze position within the Rigid Body. The console doesn't pop up then any message.

    Link to all screenshots at Imgur: https://imgur.com/a/xaFFFna

  • edited July 2020

    Make a bool parameter in your Animator named "IsGrounded", and set this as the "IsGrounded bool parameter" in your Player Inspector?

    Is this parameter checked at runtime while on the ground? If not, it'll likely be a grounding issue - make sure that the ground object's layer is included in the Ground-check layer(s) field in the Player component's "Physics settings" section. If unsure, set both to "Default".

  • edited July 2020

    Oh my god... the layers!!! Thank you very much Chris!! This was the solution to my problem! I used the New Game Wizard to create a new game and I set it as Point and Click and later in process of development of my game I decided to add another play-style so I added Direct Control in some parts of the scene. So I had to add in the Ground-check layer(s) the Navmesh as it was already set to Default.

    EDIT: Although my problem has been solved. I just noticed that the IsGrounded Bool is not set to true at run time.

    Edit: Ok i forgot add the character controller. 100% Solved! Thanks a lot!

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.