Help me make a reactive capsule pushing system

You can stop the wall by getting if the hit actor hits something during the move. This is just a thrown together example:

But this will stop the wall if the player hits anything, so you’d probably want to do more, like check what the player hit. But, assuming the wall is meant to crush the player, you can kill the player, too. You also aren’t limited to a sweep, you can use a trace as well, or anything else.

Haven’t tested, but I’m sure it does.

Yeah. But hit events fire for both actors that collide, so maybe this can be handled from the character bp instead. Edit: Did a quick test, and you can do this. I just have the wall bp only move with sweep on, and have the character BP handle the pushing part if it was hit.


The only problem is the wall randomly stops & starts sometimes. I don’t know why (think it may be that the hit isn’t firing every time for the character), but it should be easy to fix. Also, this does still use a target location variable, which means the wall actor has to have one for this to work; though, you can get it from any actor through an interface. Shouldn’t be a problem, but if it is, maybe using the trace end in the hit result or the wall’s normal can remove the need for it.

I added that boolean and the two branches and everything shown but yet the wall was still able to push my player through the outer wall of the TPC template.

Bummer…

Ok I adjusted the codes as shown.
In wall BP -

In TPC BP -

I got a strange effect, the wall stops when it hits the player and does a fast twitching thing until player moves away and then it advances again. Let me show you.

Any ideas what is going on here? Thanks!

Bump

bump

bump

Had this glitchy character pushing behavior and I tried literally every configuration of the movement component on the editor I could think of. Either this thread or another already had the info that if the character is slowly moving that the pushing will work fine. However (to me) this is not an option because it is not reliable and I don’t want characters to slowly move away from their spot.
I began using ALS (Advanced Locomotion System), the free plugin for human animations and I never noticed it again… Maybe they actually solved it. At some impact speeds it will trigger ragdoll as well which makes sense and works with pushing.

I don’t think it matters how fast or slow the movement is against the capsule the jerking would probably still remain.

ALS - I have not used it, from a few videos I watched it looks interesting. Seems pretty complex in its own right. Not sure it could help this situation though… But thanks for suggesting it!

bump bump

bump

bump

bump bump

There is another thread recently that has a solution that ALMOST worked.

I have a feeling this system might could be used to solve this problem…but I honestly am not sure why this helps this problem.

Bump bump anyone have anything on this? thanks!

bump bump

bump bump

Both Sweeps Off

Left node Sweep On, but Right node Sweep Off Yields - Y + smooth pushing

Right node Sweep On, but Left node Sweep Off Yields - X + smooth pushing

Both nodes Sweep On Yields - Y + smooth pushing

That solution (and I honestly don’t know why it helps this problem) can either be for the X or the Y, but not both simultaneously…why?

Well then…perhaps a way to make booleans fire sequentially but very very fast…would that work? What is happening here?

Thanks

bump bump

bump bump

And finally…this is it.

I found a combination that seemed to work both in X and Y. As far as I have seen, this seems to be the best capsule pushing element (for this problem IMHO) yet.

Simply place this in your third person character blueprint.

Leave X and Z alone in the two nodes. Set the left one to to 1 on the Y, and the right node to -1 on the Y. Set sweep off on the left one, sweep on on the right one.

I don’t fully understand how this works (something to do with collision calculation while moving?), but I’m not complaining. :slight_smile: I’m just glad this problem is finally solved.

1 Like

Hi There!!! I’ve been trying to do the same thing, I know it’s been a roller coaster, but is there a chance that you could explain how you did it, what nodes to put in the BP Player and in the BP Wall

After all the saga lol…it is really as simple as my last above post. Study the pic and watch the video on Vimeo. I will answer what I can. Thanks for checking it out.

Wow, thank you. Been banging my head against this for a while. Using your setup I found that collisions against the top half-sphere of the player capsule do not work very well (player can move inside of the colliding mesh and get stuck) but collisions against the side of the capsule work 100%.

1 Like