Certain Cover Detection?
Hello! How would I make a sort of detecting system that would detect how tall or how low my cover is so it can play the correct animation? I don't want a standing cover animation for a low cover XD
asked Nov 20 '14 at 03:52 AM in Blueprint Scripting
This may not be the most ideal or performance efficient solution, but it worked for me:
Create two sockets in your skeletal mesh. One at chest level named 'sock_chest' and another right below the hip 'sock_hip'. You can then do line (or box) traces toward the charcter's facing direction from these two sockets (first from chest and if it does not hit, then from hip) to a distance of say '1 meter'. This way you could detect if you have enough surface to cover against.
IF the trace from chest hit something , it means you can stand against the cover. And if it does not hit, you can do another trace from hip. If that hit, you should crouch against the cover. If both are missed, then you dont have any cover objects near by that are tall enough.
answered Nov 20 '14 at 05:49 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here