Later grab doesn't jump
I do a 2.5d game, my player jumping normally, he moves with root motion and jump with addForce.
But later a grabbing, (grab animation is play in kinematic mode, that i disable when ending the animation) i need wait some istant for can do a jump with addforce, but in this time, if i press Jump button he do animation, this animation is activable only in this mode:
if (Input.GetKeyDown(KeyCode.Space) && canJump)
{
jumpCheckGround = false;
canJump = false;
float force = anim.GetBool("Run") ? JumpForce : JumpForce / JumpDifWalkRun;
thisBody.AddForce(Vector3.up * force, ForceMode.Impulse);
anim.SetTrigger("OnJump");
anim.SetBool("Jump", true);
canGrab = true;
}
Why unity or i need wait this time for do a jump?
Comment
Your answer
Follow this Question
Related Questions
Rigidbodies stopping Root Motion of animations 0 Answers
Rigidbody doesn't seem to apply gravity 1 Answer
Kinematic sphere doesn't move 1 Answer
Unity 5: AddForce Increases power when already being pushed towards a collider. How to make stop? 1 Answer
The one about rigidbody (kinematic or not) and root motion animations 1 Answer