Hello,
I’m using Unity 2021.3.3f1 and everything used to work smoothly until now when I need to bind Space key to jump sequence.
So my code seems to be triggered correctly to the right place:
void OnJump(InputValue value)
{
Debug.Log("JUMP!!!");
if (!this.myCapsuleCollider.IsTouchingLayers(LayerMask.GetMask("Ground"))) {
Debug.Log("NOT TOUCHING!!!");
return;
}
Debug.Log("touching ground");
if (value.isPressed) {
Debug.Log("in");
this.rigidbody2D.velocity += new Vector2(0f, this.jumpSpeed);
}
}
However the jump animation is not happening. Here are some of my screenshoots:
Just to add to that using [up arrow] key does moves the player up but it doesn’t trigger onJump() method. Not sure if that help?