I want to make it so that if you press the jump button just before landing on an enemy’s head it will do extra damage, so I figure that you should have to be: Pressing the Key (not holding it), a little way above the enemy, and moving downwards. This block of code should do it I would think, but it still turns on even when I’m moving upwards. I don’t think I’m using rigidbody.velocity correctly… Any thoughts?
if (Input.GetButtonDown("Jump") hero.transform.position.y <= transform.position.y + 1.2 hero.rigidbody.velocity.y < 0) {
actionCom = true;
}