How do I make my player walk back 3 feet?

Hi guys, I’m setting up a group of nodes starting with a right click, and part of it is that I need the player to move back about 3 feet. So I figured it would be easy, but even though the node says “Set Actor Relative Location”, which I would think it’s different from world location, so no matter what direction he’s facing, he’s going to walk back as many units you tell it to in that node.

But no, when that node is triggered, the player moves according to the world location, not his location. Here’s that part of the blueprint:

What am I doing wrong?

Just press “S” like for a second :stuck_out_tongue:

Well I think we are talking about the world location not relative,
but in any case try this:

In case you want an animation a guess the solution is to play an animation or a little sequence:

1 Like

Thanks, but I had tried the teleport node before, and it didn’t work. I assumed that the relative location one would give me precisely that, the relative location.

mmm it seems is not so easy as expected, take a look, I hope it helps

1 Like

What you are doing is telling your character to move 200cm to the world ‘right’.

Get the actors Forward Vector and multiply it by -200.0, then add this to his world location. This will place your character 200cm behind the direction he is facing (will move back 200cm).

So, if I understood you correctly, this is what you mean:

Is that what you had in mind? It works differently, but weird. Depending on the direction I’m facing, it does go back 2 meters, but in other directions it moves about 30 cm each right click.

Almost: it is Forward Vector * (-200.0) → -200 has to be a float. Then you add the resulting vector to the world location.

1 Like

Thank you sir, that worked perfectly. Much appreciated!

1 Like

Just make sure you enable Sweep or you might go through walls. :sweat_smile:

Ha! Thanks for the tip, I actually tried right clicking several times and it did go through the wall :smiley:

1 Like