Need some help with pushing a cube ( add movement on collide ) Blueprint

I give up after several attempts and searches for an answer, hoping you
guys can help me out a bit with understanding how to move cubes around by
having my player push them around.
I’m doing a 2D platformer with flipbook and try to keep things simple in BP.
In my head I just want to move my cube by translating it when the player pushes
it from the side in X, but I cant seem to make the cube take inputs, tried several things.

I could use physics and push it, but that results in weird jumping actions in the cube, not smooth movement like I want. Since I have no Idea how to make it sliding around smoothly I will now try to move it by values.

Currently I just try to add movement by pressing a button, that I will later set up to act on collision from player.
Not sure If Im suppose tu use an actor or pawn, or move component to function…
It should not be this hard to move something, please help! :'D

Okay, update…
I read up on actor vs pawn, and from what I understood the pawn should be used for
when one want to possess something like a car, and keep the player inputs.
So I have created an actor instead and managed to add input data with the G key for now.

So next step will be to figure out how to make the position of the cube change when player is colliding with it, and adds axis value in some direction.

Still haven’t figured out how to solve this issue…
Latest try was hopeful but creates more problem than it solves. I tried attach the cube
to the player on collision, it worked. Sadly It was hard to make sure it detached correctly and I would get issues like not being able to keep pushing directly after letting go.

Anyone got any tips?
I just want to be able to push a block smoothly over any surface, needs gravity as well as being able to go up slopes.


This topic has been moved from International to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space. Hopefully, this new category helps you to get answers.

In the meantime, good luck and happy developing :slight_smile:

Hi 3picera,
If the physics is to unpredictible for your case, I would add collider with overlap event. If the player stands in it and pushes towards the cube you can simply add local offset, same as the players movement.
As for gravity, if it’s only “fall if not standing on the floor” then adding line trace facing downwards will help you to detect if it should fall down or not.