Download

How to control actor movement after being hit by other actor

I’m trying to implement an enemy attacking player by some kind of rushing movement on him. I want to precisely control each of the actors movement behaviour. I want them to bumb but in very thesame way each time. With same force, same angle etc. My first idea was to set each body’s velocity on onactorhit delegate. But the problem is, that I get this callback like random number of times each time - like 5 to 13 times. The problem is, that the velocity is being reset by unreal physics solver, and the value that I’ve set is gone then. Setting it like on each of next 10-15 frames feels quite hacky. Is there any way to do that? To prevent from forces being set automaticaly by collision solver when those two bodies hit eachother? Both actors are non-kinematic, and I don’t want them to be, because they need to interact with the game’s world.
Thanks in advance =]