Announcement

Collapse
No announcement yet.

Help with Pushing Blocks in UE4

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help with Pushing Blocks in UE4

    I've been developing a 3D sidescroller, and I'd like to make it possible to push a block and move it, having it stop as soon as it is against a wall. In my sidescroller, the player is going to ALWAYS run, so I'll want it set up to get the player into position and begin pushing as soon as he runs into the block. This bit is easy; my issue is actually finding an efficient way to get the block to move as the player pushes it. I'm surprised to see that there aren't a lot of these sorts of tutorials out there, but I did find these:

    https://www.youtube.com/watch?v=qxQug-c4hgk
    https://www.youtube.com/watch?v=1QSRRa0Qnz8

    Unfortunately, I've found that the way this is set up overcomplicates things to the point of there being numerous bugs, most of which I am unable to fix. In addition, I'm only looking for a way to push ONE side of a block until it collides with a wall, or whatnot, because this is a sidescroller.

    Does anyone know a simple way to do this? If you want a straightforward example of what I'm going for, you can watch this short video (this is 3D, but the way it WORKS is what I want):

    https://www.youtube.com/watch?v=98s77ctmrgY

    You may think like in The Legend of Zelda as well, if that helps at all. Any help is much appreciated!

    #2
    I would make a blueprint with a larger box component around the cube. When the player overlaps that box, then you can either have a button that starts the push or automatically start pushing. When you do that, you can get the velocity and direction of your character and move the box at the same speed and direction of your character. Or you can set the location of the cube to directly in front of your character in the tick function.

    Comment

    Working...
    X