Transform actor with key event not working

Can someone tell me why this doesn’t work?

I added a cube into the level and made it a blueprint. I put these nodes in the blueprint. If I do a hit event, when I hit the cube with Blue Guy, it instantly transforms. They key event does not transform the cube. Any idea why? I did this in the sidescroller template. Also, I would prefer to transform the object over time, but i want to move it only on the horizontal axis (y-axis). If I use a force or impulse, the cube can get pushed on the other axises.

If someone could answer these questions that would be great :slight_smile: thx!

Only the controller and character receive keyboard input by default. You have to enable it for other actors manually in their defaults. The setting should be called similar to “Receive Input”.

For the movement over time. Well you could look at doing it via event tick but the easiest way here would probably be a timeline.

Check out the documentation of it here: Timelines | Unreal Engine Documentation

They got some great tutorials in there as well.

Cheers :slight_smile:

Okay, thank you :slight_smile:

I don’t really plan on moving the cube directly by a button press, but I just want to be able to do it for simple testing, so that will help. And I will try a timeline.