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.
Because this game was made in UE3 I was wondering if there is an equivalent in UE4.
asked Dec 27 '17 at 02:15 PM in Blueprint Scripting
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!
answered Dec 27 '17 at 07:15 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here