I used a different solution to the OnJump challenge than in the video. Although my solution seems simpler (doesn’t need the capsule collider) and seems to work, I’m wondering if there are technical reasons why it’s not a good solution, or if it’s just different than the answer given. Thanks.
void OnJump(InputValue value)
{
int layer = LayerMask.GetMask(“Ground”);
if(value.isPressed)
{
if(myRigidBody.IsTouchingLayers(layer))
{
myRigidBody.velocity += new Vector2 (0f, jumpSpeed);
}
}
}