I am using x,z axis for switching lanes but when i rotate or turn the "switch lanes" axis becomes the front movement axis thus i can no longer switchlanes on the new direction.

It’s because you’re switching lanes as if the player is always facing forward.

You need to switch lanes based on the direction they are facing, so instead of manipulating the, you need something more like

actor location + ( actor right vector * 400 )

Thank you so much!!! I tried that out, Im not sure if i did it correctly tho. Now the player turns and can switch lanes when facing another direction but the lane switching is inverted and the player moves backwards/ forwards when using the switch lanes. Any ideas how to solve this?

No, like

You probably need *-400 for the W

:slight_smile:

That worked!! Thank you so much!!!

1 Like

Hi i need help .I made a runner game like temple run but i add changing lanes system like subway surf.so my issue is after turning player left or right it doesnt changing lanes

1 Like

Ah, after you’ve turned the player, then X and Y mean different things. You have to use ‘get actor right vector’ instead.

i dont understand please explain breifly where i should use this node

If you just literally change the X of an actor, it’s going to move them along the world X axis, and that’s the same no matter which was the actor is facing.

If you really want to know which direction is ‘right’ for an actor, then it’s ‘get actor right vector’ * the amount you want to move them.

Going left, is just the same as going right, but * -1

can you share your discord or skype or anything alse i want to ask a few questions more

Are you using first of third person?

Look, I wrote this code to move the player 50 in Y

It seems to work ok

Y

until I turn the player

Y2

It’s because I’m taking the absolute Y, world Y. I need to do the Y transform relative to the player’s current direction. I want the player to go sideways, like this

Now it works no matter which way I’m facing

Y3

Hey i have an other issue am using box collison when player overlap this box it should rotate 90 degree automatically , but the issue is 2 box working fine but corner collison in not working when i pur corner collison more forward direction against corner collison 1 it start working