im using the y velocity of my rigidbody to perform a double jump action. The problem is that when i press the jump button for the 2nd time on the highest point for the first jump i expect the y velocity to be higher. But it works the complete opposite, the y velocity goes down. And when i press the jump button for the 2nd time before it reaches its highest point the y velocity goes up and it jumps really high???
1st jump:
if( jumpCount == 0 )
{
jumpCount ++;
playerTransform.rigidbody.velocity.y = 16;
}
2nd jump:
else if( jumpCount == 1 )
{
playerTransform.rigidbody.velocity.y += 5 ;
jumpCount ++;
}