(SOLVED)(some) Collisions not detected

Sargonnas

Member
IDE 2.3.1.542
Runtime 2.3.1.409

*Preface - I have read the release notes for 2.3 and couldn't find help there*
So I've had slope collisions for some time now in my game. I just came back after a break (from pre-2.3) to find that my slope collisions aren't working any more, and I can't figure out why.

I have oWall objects as my generic collisions for the character. If the objects are not angled, the collision works fine. I have the objects set to change their sprite if they are at all angled, to a sprite that has a precise collision box. This has worked fine for more than a year until 2.3.

Other unrelated collisions have also stopped working as of 2.3, so I'm hoping someone can tell me just what 2.3 did to change the system.


Things I've tried so far:
*Changing the oWall objects so that they don't switch sprites, at the same time changing all oWall sprites to have precise collision detected. This had a strange effect where now the character slows down a bit but does not stop when up against a wall.
*I've tied a debug message that tells me when the character is colliding with a wall, this does not show up when the character is inside of angled wall objects.

*Edit*
Solved!
So...In the end I had forgotten that I had been experimenting with a new method of moving along my slopes, and had changed the position_meeting into place_meeting. Changing it back got it to work again...kinda.

The reason I'm not satisfied with my code is that I can't walk up slopes from a stop and often get stuck in a walk/stand cycle that looks terrible. I'll still be working on that, but for now I am not falling through slopes, thankfully.
 
Last edited:

curato

Member
Do you have any code? Are you using the built in collision events or are you tracking it yourself?
 

Sargonnas

Member
Do you have any code? Are you using the built in collision events or are you tracking it yourself?
Thanks for the quick reply!
In the end I went for tracking it myself. the players x and y are one pixel below their center bottom.
*vsp = vertical speed
*oWall = the wall collision object
Code:
if (place_meeting(x,y+vsp,oWall)) && action != "climb" && action != "ladder"  && action!="animating"
{
    var _break=0;
    while (!place_meeting(x,y + sign(vsp),oWall))
    {
        y += sign(vsp)*0.01;
        _break++;
        if _break>1000 break;
    }
    }
}
 

Sargonnas

Member
(solved, sorta)
So...In the end I had forgotten that I had been experimenting with a new method of moving along my slopes, and had changed the position_meeting into place_meeting. Changing it back got it to work again...kinda.

The reason I'm not satisfied with my code is that I can't walk up slopes from a stop and often get stuck in a walk/stand cycle that looks terrible. I'll still be working on that, but for now I am not falling through slopes, thankfully.
 
Top