Clipping Problems with floating platforms in 2D (side scroller) Tile Maps?

GOAL:
Trying to make floating platforms in a 2d side scroller that the player can jump through effortlessly from below and land on once above.

MY BAD IDEA: I’ve tried a few things so far that at first seemed to work at first, but more problems arose. First idea was to track the players Z velocity, and when it was set to anything greater than 0 (jumping upward) I had the player capsule component disable physics collision. This lead to me being able to ‘ghost’ through the floating platforms while ascending, however when jumping at an angle or when aiming for a platform just out of reach at the apex of the jump the collision would turn back on and clip me inside the platform. Tried adding a delay to the re-enabling of the capsules collision but that also just lead to new issues with clipping on the fall rather than the apex.

OTHER BETTER IDEAS?: I’ve looked up many guides and old threads at this point and found people talking about the idea of ‘on event tick’ or ‘on hit’ to call both the player Z location and the actor location (the colliding tile in the tile set?) and if the player’s Z location is greater (above said tile) set collision OF THE TILE to block and when player is below set it to ‘no collision’. I believe the idea of this is that only platforms below the player will ever render their collision boxes and thus you can never clip/collide into anything higher than your players feet. The main knowledge gap I cant seem to find the answer too is how are they referencing the title maps collision settings via a blueprint graph? I know how to ‘set collision’ of the player capsule with blueprint events, but can’t for the life of me figure out how to do the same to the tiles in a tile set. When I pull up my tile maps up in the editor I can’t seem to find anyway add an event graph to them (which might not be possible?). I also tried messing around with ‘cast to papertilemap/actor’ and could seem to find out how to achieve this result.

Any advice is appreciated.

1 Like