I am trying to acomplish a weapon that throw back other actors away - like the weapon from lucio in overwatch.
I’ve been looking for such a system for 2 hours now and I found really nothing.
I tried to use the LaunchCharacter node, but it pushes only the actor that is shooting away. Add Impulse at location using raycast don’t work - the actor doesn’t move.
Please let me know if you have any solutions. Thank you for your help!
Example Video what I would like to acomplish: Example
you could do on component hit and cast to bullet from it so if hes shot by bullet den plug the launch character and based on the hit location you make him launch away, I am currently in class so i cannot be more descriptive when i get to my pc i will try scripting up a way real quick that will be around 12 pm :\
It sounds like you’re putting the person who fires the weapon into LaunchCharacter.
Instead, plug the target character you’re trying to hit into the LaunchCharacter node.
The LaunchCharacter node doesn’t care who is doing the launching, only whom you want to launch.
heres a little example of how to get the launch character to work and launch other characters. in this example i used a box collision (box), then got all characters that were overlapping the box, used a for each to run a script on each one that launched the target away from the player and the force scaled according to how far away they were. you will need to tweak this setup to make it your own and get the numbers right but this shows the basics to get you started.
Hey, so I tried it and it worked kind of…
When I shot the Actor/Pawn it pushes back in his own capsule colider. Should I change something in the colider settings of the actor?
im not exactly sure what your saying. but if the shooter is moving then that means they are within the collision volume of the get overlapping actors, this means you either have your collision volume overlapping the shooter character or you are getting the wrong collision volume. so to solve this issue you either need to move the collision volume, select the correct collision volume, or add some script so that the shooter (self) is ignored. if you can explain the behavior your getting a little bit more then i could tell you a more precise answer.