I want to push the enemy player based on where I hit him from.
I have 3 attacks: left + right swing + stab.
E.g. if I swing from the right he should be pushed to the left. I can’t get the math working.
Right now I’m doing it this way, but it gives very inconsistent results:
The offset should cause it to always go up. Change 100 to something higher if you want them to go higher or lower it if you want something less intense (which I’m betting you’ll end up needing to do)
Thanks a lot this works so much better! There are still instances when the ball just jumps a little and not in the right direction though. Any idea what it could be?
Ah, GetUnitDrection seems to work the same as FindLookAtRotation->GetForwardVector. I implemented the solution from above and it definitely works better, than my old approach. Thanks!
I’m actually using the hit actor as the target for the launch character. That’s why I’m confused as why it would react that way. I will put your previous post as “solution” as that one helped me for 95% of the swings. Thanks for your help!