Windows Problem with jump

Pretorg

Member
Not really familiar with the physics engine but it looks like once you get to close to the wall it might be triggering a collision and using it as it is in the ground to execute the jump code again, I might be wrong so it would be better if you post your jump and collision code
 

Another62

Member
GML:
if(place_meeting(x, y, O_blocNoir) and canJump == false)
{
    canJump = true;
}

// Colision planche
if((Up or Z) and (canJump == true))
{
        canJump = false;
        physics_apply_impulse(O_Joueur.x,O_Joueur.y,0,-7);
}
 

Zekkan

Member
You only want to check for collisons below the player.

maybe something like this would work better
Code:
if(instance_position(x, y - 4, O_blocNoir) != noone and canJump == false)
{
    canJump = true;
}
 

Nidoking

Member
The problem is that you're checking for canjump before the player checks for horizontal collision and is pushed back out of the block. You should probably check canjump before applying horizontal speed.
 
Top