Moving wall / cube pushes player in steps and not smoothly, how to fix? [SOLVED]

It seems like a mad amount of effort to do something so seemingly simple. And it is all because of the capsule component’s shape why this method is so difficult. I would like to place something above the capsule component so then the CC would be parented to it and thus be moved by it.

But apparently that can’t be done, another thread about a square capsule component said “This cannot be done because the capsule component is inherited from its base c++ class” that would be the character BP.

you can make a pawn instead and give it a cube shaped component. the character is just a pawn which has got a capsule component on it. old games used cubes like this instead of capsules so it should work fine.

Honest question: is the capsule shape really an issue?

No, the issue is not the capsule shape, I just found out what the real issue is. Epic says that you can’t push a character like that because it’s not using simulated physics, so you have to use the methods belonging to character movement component. LaunchCharacter(), AddMomentum(), etc. You could build a pusher wall that uses those instead of physics.

1 Like

Thank you.

Ok trying this route now. Wonder then if the best of both worlds could happen? The player has a square component that turns into a small sphere upon holding control to crouch?

If you look at the 8th comment on this thread, you will see how it is shown that because of the shape of the capsule component for a character does not work for this particular moving wall method. I commented originally about how the player quickly snaps along the path of the wall and is not smoothly nudged. The reason is because that wall must make contact with the center and bottom of the capsule. And when it does then it apparently calculates the rest of the capsule overlapped and jumps it accordingly.

The shape of the capsule shouldn’t be a problem, your wall bp is the problem, i think it can all be fixed in there
what does your wall bp look like?

I wouldn’t have thought that either, but RevOverDrive showed how that a small cube or lip can be added at bottom of wall and it solves the problem…assuming its all at one level…I tried that solution…and concluded it was the shape of the capsule that caused the jumping effect in the OP. The diagram above I tryed to show that.

Right now really simple…it is just a camera actor and a cube attached…the camera moves…it moves…

That code on the bottom does not work, but what I was hoping for was on over lap of the moving cube component the third person character would be moved along at the same rate and direction as the wall. If I trade that on overlap node with an event tick I get this…Vimeo

For this kind of game design that effect will be needed, so I will keep that noted, but I noticed when it was like that everything worked as it should all but it auto dragging the player, so then I tried many things to trigger or gate that effect and I kept having problems.

I tried a few other things with custom collision channels, but then of course, if you make the capsule to be ignored and think you can add your own something to collide with it does no good as nothing can be placed higher than the capsule in the character hiearchy.

At the end of the day, the goal is to have the wall gently nudge the player at the speed it goes and not the jerking motion from the first video. But then…maybe it is now an issue of not seeing the forest for the trees. If the end goal is to make a ship / craft side scroller type game, then that would involve custom stuff, and that would mean using your own boundaries (likely square) for the craft.

In this video …Vimeo

If I stand still and the wall catches me…it scoots a long as it should.

But if I turn and walk into the wall until collision I can let go and you can see it do the jerking.

I haven’t tried Rev0verDrive’s way yet, so if it works it works, does it always work 100%?

Here’s what I came up with
Solution #1: You can go into the character and select that capsule and enable physics but then your character will fall over onto his face when you try to walk! :rofl: try it out. If there’s a way to actually set physics it might fix the problem.

Solution #2: Make a collision box attached to the wall which is slightly bigger than the wall, use a overlap event to cause an AddForce node to push you. I got it working that way but it’s just a tiny bit jittery. Setting movement mode to flying stops the jittering so I think it’s caused by ground friction.

All of this seems pretty hacky, and is probably not “the right way”

  1. Commonly you do it via cpp or BP when activating ragdoll.
    In fact. You can probably set the root bone to simulate physics and have it be pushed naturally by the wall, which then takes care of moving the capsule.

  2. jitter is normal if you are replicating and looking at a client.
    It’s not otherwise. So if your single player is jittering you are doing something wrong.
    (Which could be as simple as needing sub step on).

The right way, as I said before, is that it just works - for single player.

Maybe remove the player mesh from the equation.
Test with a character BP and the default skeletal cube/rectangle.

Do expect jitter and snags in replicated clients. Always.
Expect mostly fluid motion in PIE and in single player (and if it’s not, turn on substep and possibly increase the rate of it).

Let’s also state this.
Are you using the utter and total mess appropriately dubbed Chaos.
Or the old and neglected implementation of PhysX?

It could very well be that you get bad results in Chaos vs what used to be in PhysX.

(Before someone asks, you have to build from source to use Chaos, so you would know).

Assuming its all level ground…the same horizontal.

Ha, yeah when I turn physics on the capsule component the player can’t move. Perhaps there is a way to do that correctly.

That solution seems like it would actually work. I tryed something similar earlier in the thread, have the player constantly pushed along at the same rate as the wall, and just trigger or gate the effect so that it only does it when the player’s capsule overlaps the wall, I don’t know why but I could not get that to work. Vimeo

I might try with AddForce later.

Might be able to do something with that then.

Yes, I would think there is an easier and more straight forward solution to do such a relatively simple thing with this engine, perhaps some poster can come in and enlighten us all.


The jitter seems to be the way the wall is moving the capsule based on its shape.

I don’t get how that could be a factor here.

Because the animation BP is bad.
And the character movement settings aren’t ideal either.
Could be you are jumping due to a bad size perch setting for instance.

Found a thread with a similar situation. Smoothly push player while not moving? - #17 by RelioXx

In the 5th comment Capsul posted a video called “jagged” that looks like this effect (albeit faster), [quote=“Capsu1, post:5, topic:150842”]
Here’s a better example of what I’m trying to fix:

smooth: smooth
jagged: jagged

And another thread …Let objects push the character - #27 by EvilReFlex

And sadly as of Nov 20

Nov '20

Sorry for digging out this thread, but I also have this problem:

Up works without problem:
G85IiuqQL0 GIF | Gfycat

But if I push a character to a side it looks like this:
4o6XU8Y3Tl GIF | Gfycat
ATOvBIhS9n GIF | Gfycat

I have the same problem, help!

Have either of you solved this issue yet or do you both still need help?

It probably would be a good idea to create your own threads in one of the development sections if you still need help."

Not sure what your point is.

There’s been a few options for you to try. You can’t seriously tell me/us that none of them worked.

Here’s another option too:
You should be able to set the option of simulate physics on the capsule to ignore the Z axis.
This should make it so that the capsule won’t fall, but it will bounce and slide.

Since the character and animation move with the capsule, everything should follow along nicely unless you are trying to replicate across networks.

I don’t think me and you are on the same page.

Well, there was a single offered solution that works, assuming the player is on level plane. But not for unlevel ground / platforms. And an explanation as to why the effect was happening. I have tried other things suggested here and not much luck.

I would then consider this situation to be unresolved.

Could you be more specific in terms of the physics panel? When I turn simulate physics on the player CC, it seems to not be able to move, I toggled x, y, and z options but the player still could not move.

If there is a “point” to my last post in this thread, it would seem that I’m not alone in this situation and many others also have the same problem dating back many years ago and is also unresolved.

I would then think this problem is worthy of being elevated to an “ask” question.

However, it seems I can’t do that…


I appreciate any and all comments and suggestions offered in this thread, again thanks.

The one right below: lock rotation.
And the rotations you have to lock are x and y.

Do a test by using simulate instead of play.
Put a player BP in front of the moving thing.
Tick simulate, and tick the 2 locks.

Hit play and see how it works/if it works.