# Character is not being pushed away by moving walls \[SOLVED\]

**URL:** <https://forums.unrealengine.com/t/character-is-not-being-pushed-away-by-moving-walls-solved/629594>\
**Category:** World Creation\
**Tags:** unreal-engine, UE5-0, Physics, Collision, question\
**Created:** [August 16, 2022, 3:19pm UTC](https://forums.unrealengine.com/t/character-is-not-being-pushed-away-by-moving-walls-solved/629594 "2022-08-16T15:19:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [August 16, 2022, 7:00pm UTC](https://forums.unrealengine.com/t/character-is-not-being-pushed-away-by-moving-walls-solved/629594/4 "2022-08-16T19:00:35Z")

</div>

Ok, the problem with your character not being block by the wall unless they are walking is a known problem. It’s not your code.

The code is very weird, but seems to work, so never mind 🙂

Ok, it’s non-trivial. You basically have to use ‘sweep’ and add code to push the player:

> [@Smoothly push player while not moving?](https://forums.unrealengine.com/t/smoothly-push-player-while-not-moving/150842/15):
>
> Reviving this thread because I came up with a solution: -set moving object location with SWEEP enabled -if sweep hit anything, add offset to hit object -set location again without sweeping images here: video here: [3FKKE5KRSc](https://streamable.com/iigsb5) It currently has a limitation I’m attempting to work around, which is that even if the player is standing on top of the object, the sweep detects it and causes the player to get thrown off if it has a movement component that supports obje…

Here’s a more sensible way to move an object back and forth

> [@Move object back and forth to original position, with variables](https://forums.unrealengine.com/t/move-object-back-and-forth-to-original-position-with-variables/471179):
>
> Hi all I’m working on a Blueprint on an Actor to get it to move back and forth on the X axis, and I want to make the move length and the move speed variable. This has been done. The issue I have run into is that the actor does not always ‘reset’ at its original position - the end position changes based on the settings of my current Move Length variable. My blueprints and timeline are attached. What is a good way to ensure that no matter what I make the Move Length value, the object will alwa…

---

_[View the full topic](https://forums.unrealengine.com/t/character-is-not-being-pushed-away-by-moving-walls-solved/629594)._
