Strange collision bug with immovable objects

  • @galoyo Tried forcing X and Y instead of setting immovable... Yeah, not what I wanted.

  • there might not be a solution to this. that is, the way you are moving objects in the above image.

  • @galoyo That's simply the default collision call between the player and the blocks, along with the hack to try and force the blocks back to their original position. Nothing fancy or unusual about it.

  • Upon further investigation, I'm convinced that it's exactly a manifestation of this issue. By default some of the boxes will block while jumping up and some while falling down, but sorting the group of blocks by ascending/descending as mentioned in the issue will make them all block the same direction.

  • yes, and to make matters worse, the immovable == true should be renamed to moveable == true :)


    In computeOverlapY when constructing the two rectangles, it's using Object1/2.x instead of Object1/2.last.x, which is inconsistent with how the computeOverlapX function was doing it. Making this fix seems to have solved the problem!

    I'll post back if I notice any other strange effects that result from this change.

  • There's only one issue that I've noticed. In situations where the player can move both laterally and fall down, there's a "jitter" that can occur where it'll sit on the corner of the block and just sort of vibrate. This seems to be partially due to trying to fit a 16x16 player into a 16x16 hole - reducing the player size to 14x14 fixed it in most situations, and further reducing the player size to 12x12 removed it everywhere.

    Regardless, this behavior seems preferable to the buggy blocking described previously.

    Here are a few examples.

  • yes, also, when using tilemapExt import for sloped tiles there is a jitter bug. I am using 32x tiles and 28x sprites and the jitter is still there. to fix, you could use an overlap tile that is invisible and use that tile overlapsAt on all those slope tiles but not the corner ones. that's how I fixed the jittering.

  • @galoyo We aren't using any sloped, or non-rectangular tiles.

  • @NoahWilson ok. I thought maybe that information would help you or someone else reading this topic with jitters and other bugs. :)

  • I ended up writing custom logic for the player that detects and corrects jitter. Not ideal, but it works well enough.

  • This post is deleted!

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.