Moving Object makes the player 'stutter'

I was trying to make a block (with block-all collision) move sideways. And it does. But when it pushes the player, the player is pushed in a ‘stuttering-motion’ almost as if the player is lagging out. Like I make the block move 100 in the x-axis and the player would hug the block on that side, then the player is only moved twice (2x 1 frame) during that entire motion. And in between those frames the player is inside of the block. Why?

Note that it works flawlessly without ‘stuttering’ if the player stands on top of the moving block.

Nodes below are attached to EventBeginPlay:

So um, this may just be me, but why are you running this logic on tick? Did you try to see if this Timeline was running more than once because of it being on tick? Also, the fact that it’s not on delta time is going to cause of lot of frame dependent issues.

Do you really need this on tick? That means, that this logic is going to happen every frame. I notice your bool logic, and I am assuming you are thinking that this will block it. But, Why not make a custom event for your Timeline to happen?

If you really need this on tick, at the very least, use DeltaSeconds. EventTickDoc Regardless. You only need the timeline event to run once. There’s a big chance it’s running multiple times because of your current logic.

Do you really need this on tick?

You are right. I changed it and added it to the beginplay, pluggin the finished pin back into the play/reverse pin. Much cleaner. I updated it in the Question.

But I still have the stuttering problem for players that are being pushed by this moving-cube.

The stuttering problem has nothing to do with your logic, even though I question the whole Direction/EnumBoolLogic. On BeginPlay this is moving at least once, and then after it’s finished the logic loops.

You have to check collision volumes and also the dampening on the character.

With sweep enabled it will never push other objects and will instead just stop moving. Sweep must be disabled.

But yes with Sweep disabled with the setup from Nick J. it still stutters the player when it is pushing the player.

To add to what @VictorBurgos is talking about. Try to simplify your setup. Create a simple box, put it in your scene next to your character and see what happens.

89159-1.png

A simple script like this will slowly move it on tick along a given axis. Does that push your character smoothly?

Problem is that playercharacters simply CANNOT be pushed correctly by other objects when they stand on the floor. The solution is to move them manually the moment the pusher collides with them.

1 Like