And.........the moving wall situation is back................sort of...

Those that know me at this forum, know how years ago I had quite the time with having moving horizontal walls “smoothly” push the player. Many suggestions were thrown out and what ended up working for me I still don’t truly understand how it alleviates the problem. Just that it fixed it. You can read about that https://forums.unrealengine.com/t/help-me-make-a-reactive-capsule-pushing-system/495114/41here

Now…enter a similar yet different situation. Last night I tried a new system for getting the NPCs to walk in my Beat Em Up template. But now you have a player that is being pushed left at and propelled by an event tick, and when he reaches a barrier that should block him, we see an all too familar dance called the herpa derpa jerka.

I know enough about this to know it is because of the capsule component shape that ultimately causes wall jerking, both passively and actively. The CC is a cylinder with a half sphere top and bottom. Whenever the effect is seen in your projects, it is because the CC initially penetrates the wall UNTIL the EXACT CENTER of the player’s CC is reached, AND THEN, the player is rudely kicked out, not a smooth push, but a teleport essentially. A teleport whose rate is governed by a few things…

I can tell you why in this video you see the player drift up after bouncing a few times, it is because of the tilt of the wall here which I had to do to give the TPC a full field of play.

Here is the new NPC walking code for those that care to see it. This is just moving left.

Unless you desire to see automated sliding chess pieces ( a character with no animation) the trick here seems to be to get your capsule, and feed that to a get physics linear velocity to a get vector length to a float named “speed” and fix that up in your ABP.

I had mentioned it to you before but this is the core of what’s wrong. Use the movement component for moving characters. Setting actor location undoes all the goodness movement component procures. Any why mix physical velocity into this?

  • the NPC keeps walking right…

image

  • …right into a moving wall:

  • the wall:

1 Like

After testing a bit I went back to add movement component lol.

1 Like