$begingroup$

I’ve scoured by means of the web to discover a answer of this however that is the one answer that I might discover however it cancels the “yMove += jumpingVelocity * deltatime” as quickly as collision shouldn’t be detected anymore thus it immediately simply goes down. If I take away the isJumping the character continues to go up so long as the bounce button is pressed.

xMove = 0;
yMove = 0;

if (handler.getKeyManager().left) xMove -= movementVelocity * deltaTime;
if (handler.getKeyManager().proper) xMove += movementVelocity * deltaTime;
if (handler.getKeyManager().bounce && onFloor && !isJumping) {
    yMove += jumpingVelocity * deltaTime;
    isJumping = true;
}
else{
   isJumping = false;
}
// gravity
yMove += gravity * deltaTime;

dechire is a brand new contributor to this website. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

$endgroup$

You should log in to reply this query.

Browse different questions tagged .