My question is quite simple :
How do I push my character with a moving wall away ?
At first it looked quite easy but after working for hours on it I still can’t figure it out.
Here is what happens :
My character is moving normally when the platform functions like a lift but it’s not getting pushed sideways.
Heres a video to this behaviour :
Character getting bugged (2).mkv (10.0 MB)
But funny enough it works when the character is walking against the wall :
Character walking against wall.mkv (5.7 MB)
So my question is why is my character not getting pushed sideways ?
Heres also some code if you need it
Plattform Code :
For the Character I just have the normal ThirdPersonCharacter code.
You’re calling a timeline on tick!?
That means you’re calling that timeline every frame. Is that really what you mean?
I’m quite new to UE5 so I watched a tutorial on that. What would be a better way to move the plattform ?
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:
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:
[ju4pu1a.png]
[Ezbj4jD.png]
video here: 3FKKE5KRSc
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
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…
2 Likes
Ok I will try it out now and notify you if it worked. Thank you so much for the help !
1 Like
I got it finally thanks to your help !
I can’t thank you enough !
Here is the code for other people :
Put this into the code of your moving wall :
Get this for the Wall settings :
Put this into your ThirdPersonCharacter code or just the character you are using :
Here’s the vid of it working well !
Character can be pushed.mkv (8.3 MB)
2 Likes
You actually dont need the second part of the code inside the moving wall lol
Just noticed it
Well done, this is great!
2 Likes
For UE5, would this be the solution given?
For example, instead of the eventTick, it is better to activate it when it is needed, that is, when colliding near a moving object.