Real time partial collision detection

I wanted to know if there was an easy method to create real time collision cutting like in the game “A hat in time” for a side scroller game.

225188-collision.gif

Because this game was made in UE3 I was wondering if there is an equivalent in UE4.

Hey! Creator and primary programmer on A Hat in Time here.

The above is achieved using 2 steps: code and visuals.

In code, we created a custom component with a point and radius. Then for specific objects (like the leaf in the gif), whenever the player collides, we check if the player is within the radius of any of the custom components - and if so, we allow the player to collide. Pretty simple, and doesn’t require dynamically “cutting” the mesh.

For visuals, we pass the sum of all custom components to materials who ask for it (via a usage flag), and then the material just calculates per-pixel whether its within the radius - if so, appear solid.

Hope this helps!

Woaw didn’t think it was this simple. Thank you!