I have a cube that I want to add a limit of how far it can travel on the y access could some help me

I’m quite new to unreal so the movement could be shorter but I just cant seem to rap my head around adding a limit on how far the blueprint pawn can move on the Y access. could anyone assist me if possible

Perhaps you could clamp it:

or:

or accumulate distance travelled and block it when threshold has been reached.


Btw, you can Set Actor Location:

image

Since you’re not doing anything with the rest of the transform anyway.

thank you so much was really helpful.