Is there any way to create a ‘knockback’ attack in UE4? I’m trying to recreate a move where the person utilizes control of gravity to push back a specific opponent, or just knockback everything around them.
I’m aware of ‘Launch Character’, but have no idea how to use it, or if its even relevant to creating an attack where you can push people or things away from you.
Thanks in advance.
below is one method i used to implement a knockback. it was based on a begin overlap event and the blue line you see that goes off screen is the actor to be knocked back (a character in this case), the cube is the mesh of the actor that is knocking things away. this is physics based but im sure theres another method that could be done using other means.
in the example the way i was working it was when the character overlapped the cube they would be knocked back. but in your case you could probably just use another character location and have the ability triggered off of a input event.
heres a little example on how this could be used as an on use ability. i made it very quickly so it may not be optimal but it shows how you could set it up. also you could use the launch character node instead of the add impulse is you wanted to.
So for the cube that is knocking the actor away, i assume its invisible right? do you have it being launched at the character?
Could I theoretically spawn this invisible cube on my character, then anyone who steps inside it would be launched/knocked back?