Top Down Shooter - Have character move relative to current rotation

I started Top Down Shooter game, but from the third person template (a recommendation from a YT tutorial).

I have a function that rotates the character towards the mouse cursor, with a max rotation per tick. And then I managed to change the forward/backwards character movement controls to work the way I want them, meaning, to always move towards the character.

But I haven’t been able to do the same with the side movement. It either always moves in the same direction (world X and Z axis) or it moves the character in the axis I want but it also rotates it, so it starts doing some weird circles. I want to move sideways relative to the cursor rotation always, so that the player can “peak” a corner for example.

I’ll attach some screenshots:

for sideways movement relative to the aim, dont rotate the actor from the move input. you are already driving the yaw toward the cursor, so reuse that yaw to rotate the input vector instead: build a yaw-only rotator, take its right vector, and feed it into add movement input with the side axis value. that gives strafing that follows the crosshair without spinning the capsule.

also turn off orient rotation to movement on the character, otherwise the movement component rotates toward velocity at the same time and that is what makes the weird circles.

Top Down Space Shooter Game Template, a modular blueprint and C++ top down shooter starter for Unreal Engine 5, ships the spaceship, projectile and spawner setup if you want a working top-down rig to compare against: Top Down Space Shooter Game Template — Modular Blueprint & C++ Starter Project | Fab