How to draw to cast an ability?

Hello a while ago my university teacher showed us a game he was making for his phone on unreal. It was a bird eyes view game where you have to draw things on the screen to cast abilities a lot like Eternium.

how would you recreate something like that on unreal?
how would i proceed to draw on the screen like that as well how would i make unreal remember these shapes?

Any help would be Omegaly Appreciated <3

Hi there! Not an answer, however that can help you

  • First of all you should think how to get appropriate data from rather big array of MouseXY. You can apply some filters to remove noise and to smooth coords. After that you should try to get less points data from initial rather big. Example 1: you can use diff of mouse steps and and filter only one that have rather big direction change - you can find angles with that. Example 2: apply integer division to all coords and every iteration you will loose some points due to some of them will gain the same values after division - after many iterations you gain some archetype.
  • The second problem: even if you have some minimal data you now want to find what kind of known spell it is. Let say you have got a set of canonical data fo each spell. The most simple way is just calculate some special distance from each canonical data item and the one you you get from prev step.