Creating a basic pushable/draggable block

Im trying to create a sidescroller and the first thing i needed was ofcourse a piece of block that could be moved and dragged for puzzles and still have physics enabled.

I managed to restrain the physics with “Physics Contraint” so the box was pushable correctly but its gonna be a problem when it eventually hits a wall and there is no way to pull it back.

Later on i tried to add a physics handle so i could grab the handles but all the answers for that were for first person and the more i work with it the more problems comes up with the blueprints.

Anyone could help me here?

Dragging would require some mechanic, like a key press, to grab the block. Then use a physics handle to grab the block.

HTH

Well i tried that but it seems i cant get it to work and i dont really know where i need supplement the necessary variabels to make it work.

i tried other variations but i really just dont know where i do wrong.

Hey Slack,

A physics handle is what you’re going to want to use in this case. You’ll need a certain event or keystroke to determine whether to attach a physics handle, and a tick to update it.

An example would be having your character press ‘E’ near a box. You’d handle the event by creating a physics handle between the sidescroller character and the box, and then you’d update the physics handle as a means of moving the box.

Here’s an example of how you would update the physics handle:
This keeps the box in front of the character. So if you take this and implement this for your sidescroller, when you move backwards, the box slides backward as well and the same logic for pushing forward.
https://wiki.unrealengine.com/File:PhysicsHandle02.JPG

hey did it work ? if so i would like to know how you set it up