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:
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):
You may think like in The Legend of Zelda as well, if that helps at all. Any help is much appreciated!