Sorry I’m not super knowledgeable about UE4, is there any way you could possibly provide pictures/screenshots on how to that, I’m not really even sure how to do that. I do get the part where I line trace over the sword mesh once, but the rest I am clueless on.
I have to warn you the axis you will choose to rotate the final angle depends on how your weapon mesh is rotated. As you can see in the image, the Mannequin, which is the Mesh my Hitbox is attached to, is rotated 90 degrees by default. For me, to make it work following this initial offset from the mannequin I had to plug the “SlashOpeningAngle” variable to Roll, not Pitch.
Hope this fits your purpose. And I hope I’ve made myself clear… otherwise just ask.
Another thing to point out is you have to take care not to damage multiple times your enemy, I suggest you store the traced enemies references and check if they have already been hit by the current move.
After adding the needed variables to get it to work, I seem to be getting a compiler error on play, but I don’t get any error messages, and there’s a check mark on the compiler button after I press it, so I don’t know what I’m doing wrong exactly.
Not sure how to help you with this… in Blueprint Editor, there’s a Compiler Results Window.
If there’s no error on your blueprint, so the problem may be in another class.