Problem with understanding how collisions work for blueprints

Hi I have problem with colliding two bluprints.


I want to move cube towards wall with given script.

As far as I understand when sweep is checked on, cube should don’t move further when collide with the wall. But in my case cube is going through wall.

When I add physics simulation to the cube it falls down and hit the plane, so colliding with ground is working fine, but when I try to move it by myself it does not work.

What I am doing here?

For more context: I want to create simple pong game, and limit movement of player character (the cube) with side walls of game field, so that is why I need to block my cube with other wall.