# Select spline at runtime

**URL:** <https://forums.unrealengine.com/t/select-spline-at-runtime/335911>\
**Category:** Community & Industry Discussion\
**Tags:** unreal-engine, runtime, Splines, question\
**Created:** [October 20, 2015, 3:20pm UTC](https://forums.unrealengine.com/t/select-spline-at-runtime/335911 "2015-10-20T15:20:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RiseAgainst](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RiseAgainst](https://forums.unrealengine.com/u/RiseAgainst)\
**Post date:** [October 20, 2015, 3:20pm UTC](https://forums.unrealengine.com/t/select-spline-at-runtime/335911/1 "2015-10-20T15:20:15Z")

</div>

I have implemented creating/placing splines (with spline mesh components) during game play (mouse clicks/touches), but I can’t seem to select them after they are placed in order to further modify them (move points around, add more points, etc.). The approach of getting and breaking a hit result to get the actor hit that I use for single mesh objects doesn’t seem to work. In both cases, the (spline and individual mesh) classes derive from actor.

Any suggestions for how to select a spline at runtime? Am I missing some collision (or other) setting that prevents the hit result from reporting the spline? My current thinking is to brute-force checks against all splines on each mouse click/touch when not in “placement” mode, but I’m hoping there is an easier/built in method.

---

<div class="post-metadata">

**Author:** ![alperenakyuz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@alperenakyuz](https://forums.unrealengine.com/u/alperenakyuz)\
**Post date:** [October 23, 2015, 11:42am UTC](https://forums.unrealengine.com/t/select-spline-at-runtime/335911/2 "2015-10-23T11:42:19Z")

</div>

Not actually built-in but what you can do is select the spline with a line trace (for this you need to enable the complex collision setting in the static mesh settings so it can figure out the exact collision point when it curves around). Then you can display spheres at spline points which can be clicked and draged with the mouse.

---

<div class="post-metadata">

**Author:** ![RiseAgainst](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RiseAgainst](https://forums.unrealengine.com/u/RiseAgainst)\
**Post date:** [October 23, 2015, 3:26pm UTC](https://forums.unrealengine.com/t/select-spline-at-runtime/335911/3 "2015-10-23T15:26:44Z")

</div>

Thank you for the response. While it didn’t directly fix my problem, it led me to a workaround:

> **[SplineMeshComponent collision not working at runtime?](https://forums.unrealengine.com/questions/165401/splinemeshcomponent-collision-not-working-at-runti.html)**
>
> I installed UE4 two days ago and have been messing around with trying to procedurally create a track to traverse in a vehicle (building off the basic vehicle template). I’ve created a basic blueprint for a spline component which adds an appropriate...

By setting the static mesh after after setting the start and end of the spline mesh component, my clicks on the spline now register. Thanks again for letting me know it should be possible and pointing me in the right direction.

---

<div class="post-metadata">

**Author:** ![TEKutz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TEKutz](https://forums.unrealengine.com/u/TEKutz)\
**Post date:** [August 3, 2022, 3:00pm UTC](https://forums.unrealengine.com/t/select-spline-at-runtime/335911/4 "2022-08-03T15:00:50Z")

</div>

What was the workaround?
