C# in Unity
//Lunge attack
if (CC.isGrounded && Input.GetButtonDown("SquareButton") && _downwardAttacking == false)
{
Attacking = true;
_lunge = true;
_velocity.x = 0;
_velocity.z = 0;
Vector3 lungePower = this.transform.forward * _lungeSpeed;
_velocity.x = lungePower.x;
_velocity.z = lungePower.z;
}