# Have a character move right and left after turning a corner with a lane system?

**URL:** <https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086>\
**Category:** Blueprint\
**Tags:** endless-runner, unreal-engine, Blueprint, question\
**Created:** [March 29, 2015, 9:24pm UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086 "2015-03-29T21:24:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_8491f3c0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8491f3c0](https://forums.unrealengine.com/u/anonymous_user_8491f3c0)\
**Post date:** [March 29, 2015, 9:24pm UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086/1 "2015-03-29T21:24:13Z")

</div>

Hello!

I’m still fairly new to blueprint and am having trouble with movement within a lane system in my endless runner prototype. So right now I have it so that the character either moves -/+ # of units in the Y-axis to switch lanes. However, this no longer works after I make a corner turn as he is facing a new direction.

Video of the lane system being demonstrated before and after making a turn: [environMENTAL - Game Dev #01 - YouTube](https://youtu.be/2whYyv9z8kg?list=PLTcnv4vb1FhUd2P0PJZqiJtVx5CL7d1WH&t=12)

How can I make it so that the direction is updated when he turns a corner so he is able to still move left and right? I would assume I would need to have it so he can move in only his Y-axis and not the world’s Y-axis?

This is what the blueprint setup looks like for the movement right now and it is the same for the Move Right blueprint except + in the Y-axis.

 ![36486-2015-03-29_pers_envmental_forumquestion01_tylo.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/1/e716210338cf691e8bf31e941a3efd73a88dcbd2.jpeg)

Thanks!

---

<div class="post-metadata">

**Author:** ![Co](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Co](https://forums.unrealengine.com/u/Co)\
**Post date:** [March 30, 2015, 7:38am UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086/2 "2015-03-30T07:38:13Z")

</div>

You should move left/right in your pawn local space, not in world space.

Instead of just adding {0, 200, 0} to your location, use your pawn right vector multiplied by +/-200 and everything should works fine 😃

 ![36545-moveright.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/c/f/2cfb0d5fc8182b904ab82d1d8a3940c6e7f61daf.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_8491f3c0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_8491f3c0](https://forums.unrealengine.com/u/anonymous_user_8491f3c0)\
**Post date:** [March 30, 2015, 1:55pm UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086/3 "2015-03-30T13:55:42Z")

</div>

That worked perfectly and was so simple! I knew there was some other vector orr something I had to get from the actor! I thought it was forward vector but I should have been hovering over them as that is X and right vector is for Y!

Thanks a lot for the response!

I had another question though in how I could contain this so you can only move over a certain amount of times? I want there to be only 4 lanes and right now you can continue moving so you move outside of the walls. I would think there is a way to limit the movement so you can only move so many times each way maybe?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![v455664v](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@v455664v](https://forums.unrealengine.com/u/v455664v)\
**Post date:** [May 28, 2015, 11:37pm UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086/4 "2015-05-28T23:37:21Z")

</div>

hey… how can I create this Lanes System? From the begining

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f0a55e8a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f0a55e8a](https://forums.unrealengine.com/u/anonymous_user_f0a55e8a)\
**Post date:** [September 11, 2015, 11:41pm UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086/5 "2015-09-11T23:41:22Z")

</div>

Here ya go!

https://www.youtube.com/embed/yS-yQfo0lc0?feature=oembed&wmode=opaque&list=PLZlv_N0_O1gbY4FN8pZuEPVC9PzQThNn1

It might be old, but Blueprints in UE4 tend work regardless of version, so it should at least get you started. 😃

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1c75186e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1c75186e](https://forums.unrealengine.com/u/anonymous_user_1c75186e)\
**Post date:** [March 1, 2017, 1:42pm UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086/6 "2017-03-01T13:42:18Z")

</div>

how did you got the lane system working

---

<div class="post-metadata">

**Author:** ![rituparno](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rituparno/32/1125530_2.png) [@rituparno](https://forums.unrealengine.com/u/rituparno)\
**Post date:** [December 3, 2020, 7:10pm UTC](https://forums.unrealengine.com/t/have-a-character-move-right-and-left-after-turning-a-corner-with-a-lane-system/313086/7 "2020-12-03T19:10:27Z")

</div>

**The Best Thing Is Use Unreal Spline System , This Will Completely Fix The Issue;**
