# Character spline path branch

**URL:** <https://forums.unrealengine.com/t/character-spline-path-branch/372000>\
**Category:** Character & Animation\
**Tags:** branch, unreal-engine, follow, path, Spline, Blueprint, question\
**Created:** [September 29, 2016, 6:47pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000 "2016-09-29T18:47:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Bishop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Bishop](https://forums.unrealengine.com/u/A_Bishop)\
**Post date:** [September 29, 2016, 6:47pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/1 "2016-09-29T18:47:20Z")

</div>

I’m currently working on Side scrolling game project and i have made character locked in to spline path.  
Followed this tutorial

> **[Tutorial: Blueprint Spline locked sidescroller (e.g. Klonoa / Pandemonium...](https://forums.unrealengine.com/showthread.php?24522-Tutorial-Blueprint-Spline-locked-sidescroller-%28e-g-Klonoa-Pandemonium-style-game%29)**
>
> I’m very new to blueprints so please feel free to share if you know a better way to achieve the same result and please do post videos of anything you make with this method. Would be great to see what people come up with. This example uses Blueprint...

and it worked but i need branch character path to other spline after he hits the trigger. After few attempts to come up with this i give up. No ideas.  
Any suggestions are welcome!  
Thank you.

 ![109000-highresscreenshot00003.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/d/4cdc83ec5cd8542dddf8040ab2f450919daf5ece.jpeg)

---

<div class="post-metadata">

**Author:** ![PasteDog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PasteDog](https://forums.unrealengine.com/u/PasteDog)\
**Post date:** [September 30, 2016, 7:25am UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/2 "2016-09-30T07:25:58Z")

</div>

Could you upload a screenshot of your blueprint setup where you try to switch splines? It might help us to see what your problem is.

---

<div class="post-metadata">

**Author:** ![A\_Bishop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Bishop](https://forums.unrealengine.com/u/A_Bishop)\
**Post date:** [September 30, 2016, 1:08pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/3 "2016-09-30T13:08:59Z")

</div>

![109130-test_07+-+unreal+editor.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/a/8ca782e1361fa2b4f317bd9f9fbdc01ccb68e4de.jpeg)

I added second variable “Char\_spline\_2” wich reffereced to another spline through branch node. I know this not going to work that was just an idea…

---

<div class="post-metadata">

**Author:** ![PasteDog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PasteDog](https://forums.unrealengine.com/u/PasteDog)\
**Post date:** [October 5, 2016, 2:15pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/4 "2016-10-05T14:15:15Z")

</div>

Uhm, I don’t see any logic problems directly in you Blueprints…

Make sure you set the Char\_Spline\_2 in the details of your character located in your level, the Char\_Spline\_2 might be connected to nothing or to the wrong spline.

What you could do to make it more readable is:

- Add an extra Char\_Spline variable and call it Char\_Spline\_Var
- Delete the branch in the beginning of your event Tick and connect your tick directly to the top SetActorLocation node
- Change every Char\_Spline into our new Variable Spline(Char\_Spline\_Var) in this BP line
- Disconnect the Press B button
- change the on pressed to set our variable: Char\_Spline\_Var to Char\_Spline
- change the on released to set our variable: Char\_Spline\_Var to Char\_Spline\_2

Now you completely eliminated the extra branch that has the same blueprint code and changed into a “Variable” one

Hope this helps,

Elias

---

<div class="post-metadata">

**Author:** ![A\_Bishop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Bishop](https://forums.unrealengine.com/u/A_Bishop)\
**Post date:** [October 5, 2016, 2:40pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/5 "2016-10-05T14:40:35Z")

</div>

Thank you! I thought you forgot.  
I’ll try and replay results.

---

<div class="post-metadata">

**Author:** ![A\_Bishop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Bishop](https://forums.unrealengine.com/u/A_Bishop)\
**Post date:** [October 5, 2016, 3:16pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/6 "2016-10-05T15:16:07Z")

</div>

Char\_Spline\_Var must be referenced to Char\_Spline Bp or Char\_Spline\_2 Bp? Or it must be Float?

---

<div class="post-metadata">

**Author:** ![PasteDog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PasteDog](https://forums.unrealengine.com/u/PasteDog)\
**Post date:** [October 6, 2016, 11:34am UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/7 "2016-10-06T11:34:54Z")

</div>

It must be the same type as Char\_Spline, so it would be like a SplineActor?

---

<div class="post-metadata">

**Author:** ![A\_Bishop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Bishop](https://forums.unrealengine.com/u/A_Bishop)\
**Post date:** [October 6, 2016, 1:02pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/8 "2016-10-06T13:02:56Z")

</div>

Char\_spline variable is referenced to Char\_spline Bp so it knows start world location of spline bp.Same thing with Char\_spline\_2.  
Char\_spline\_var variable can’t be same type of variable.

 ![109865-zsfva_2134.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/3/7e3e107d21b7c5aa8cf58c51a70d9b78e420c5f2.jpeg)

---

<div class="post-metadata">

**Author:** ![PasteDog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PasteDog](https://forums.unrealengine.com/u/PasteDog)\
**Post date:** [October 6, 2016, 3:21pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/9 "2016-10-06T15:21:55Z")

</div>

Both spline actors should be from the same blueprint 🙂 No need to create a new blueprint class since they should both have the same functionality.

If you make a copy of your first one and get the world location from the copy it will be the correct position, if I get home I can explain this a bit more if you need 🙂

---

<div class="post-metadata">

**Author:** ![A\_Bishop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Bishop](https://forums.unrealengine.com/u/A_Bishop)\
**Post date:** [October 6, 2016, 10:26pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/10 "2016-10-06T22:26:26Z")

</div>

No i understand.please show me that—  
change the on pressed to set our variable: Char\_Spline\_Var to Char\_Spline

change the on released to set our variable: Char\_Spline\_Var to Char\_Spline\_2  
Thank you!

---

<div class="post-metadata">

**Author:** ![PasteDog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PasteDog](https://forums.unrealengine.com/u/PasteDog)\
**Post date:** [October 7, 2016, 6:34am UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/11 "2016-10-07T06:34:39Z")

</div>

Drag the variable onto the grid and select the “set” and then plug in the Char\_Spline and in the other one plug in Char\_Spline\_2.

---

<div class="post-metadata">

**Author:** ![A\_Bishop](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@A\_Bishop](https://forums.unrealengine.com/u/A_Bishop)\
**Post date:** [October 7, 2016, 4:41pm UTC](https://forums.unrealengine.com/t/character-spline-path-branch/372000/12 "2016-10-07T16:41:31Z")

</div>

So this what i did and it’s not working.

 ![110016-111.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/a/cdab50fde70a8707a8448880d6d9abfc8da7049b.jpeg)

I deleted second spline bp and just dragged first one into the scene to create some second spline.  
I selected Char\_spline2 in the details of the character.Char\_spline\_var (no tooltip referecend Bp but the same type) leave as none. Other way it’s pointless because it is setting position on first spline and only.But in this case Char\_spline\_var not determinating world position and this what we get

 ![110017-333.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/9/809c88881a51346c1e11686f028db24ba7f9ffc8.jpeg)

Here whole setup

 ![110019-222.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/f/6/5f60724e3f668de8f3f01c3aa52252140ab16c1a.jpeg)

May be we could do something that works in online?I would appreciated a lot!!!
