Push player character with moving object (boulder)

Hey guys!

I really need help with an issue I have with my game. To get a moving object, in this case a boulder (round sphere mesh). I am curious how I could (in blueprints) do the following:

  • When hit by object (discover which angle the hit happened)

  • Add Force/Launch in opposite direction

I have tried some possible solutions here on the answerhub but to no conclusion.

The possible solutions I tried:

Can somebody help me, please?

Thank you for your answer. I tried that, but my character just stands still like a brick.
I also tried increasing the mass of the object, but it didn’t make any difference.

Here is a screenshot of my blueprint:

The solution in link 3 should work, but you have to multiply the normalized vector not only by -1, but by the amount of force you want to apply. And I believe it’s better to Add Impulse instead of force, and don’t forget to connect the object you want to push to the Target input.

Thank you again, but still no effect. My character stands still like a wall, but the object itself gets pushed back upon collision with the character, but not by the effect from the blueprint I think.

The character is still not moving from its position when being pushed. But if I move the character towards the object then the blueprint works and I am being pushed back.

There also is added another bug after this. When the character is being pushed, then it bounces infinitely up and down.

The characters bounce has the same force as written in the multiplied vector. If that helps

Great! That stopped the bouncing.

Well, I have two empty scene components which themselves are a pivot. Do you think this is the problem?

Edit: I turned the character around before getting hit, so it can not be the problem.

Try enabling Vel Change tick box - the impulse will ignore the mass. And 100 is too little, try larger values like 5000-10000 or even more.


And I believe Hit Normal comes already normalized, you don’t have to use the Normalize node again.

This screenshot of yours, it’s in the character BP, right?

What if you use the Launch Character node instead of Add Impulse? And don’t use the capsule component there, I believe it will use Self automatically (or connect Self as a target if not).

The character goes on bouncing because you have to check if the Other in the Hit node is your boulder. Because like this all the hits will cause the character to be pushed, against walls and ground and everything else.

Next, if the character is launched when you move forward a bit, it means that the launch itself works, but the hit event doesn’t happen for some reason. My guess is the actual engine physics stops the boulder before it hits the character capsule component. Do you have any other components in your character that stand in the way and might block the boulder from reaching the capsule?

Does your boulder move just by physics? Or by something like timeline of linear interpolation?

What if you just throw any other object at the character, does it work? (remove cheking for the boulder first).

P.S. What is the size of the boulder? Is it possible that it pushes the Character downwards?

I also tried this post, but to no effect: https://answers.unrealengine.com/questions/199342/view.html

What I did:

  • I disabled and enabled the simulation generates hit event.
  • Changed different collision presets.

Does your boulder move just by physics? - Yes

Or by something like timeline of linear interpolation? No

What if you just throw any other object at the character, does it work? (remove cheking for the boulder first). - No, same issue as with boulder (sphere).

P.S. What is the size of the boulder? Is it possible that it pushes the Character downwards? - Size is irrelevant, I tried with smaller size but the problem still persists.

If I move towards the object and hit it, then yes. If I stand still and let the object hit me, then no.

Sorry for all of this, but I really can’t seem to get this to work.

Okay, as a workaround:

Don’t connect the vector to the Velovity input in the Launch Character node, just make the Velocity [0,0,10000]. Will your character be thrown up?

Okay, as a last resort, try setting the boulder’s collision preset to Overlap Pawn. In the Character BP, set On Begin Overlap event for the Capsule, Find Look At Rotation from Other Actor’s location to Self location, Normalize the vector you get, multiply it by the amount you want, and feed it to the Launch Character node. If that works, you’ll know the problem is in the Hit event. If nothing changes… well, I hope something changes =)

This is what I get, I think I am doing it wrong.
Do you mind making a screenshot of how the blueprint should be?

Sure, but only in about 2 hours.

No problem! Thank you so much for helping still! I really appreciate it!

Okay, I checked something.

This works as intended for me:

As for overlapping, couldn’t manage it to work properly, unfortunately.

Launch the game and select debug object in the blueprint. You’ll see what’s going on there and what’s not.