# Drag object along multiple set paths

**URL:** <https://discourse.threejs.org/t/drag-object-along-multiple-set-paths/29482>\
**Category:** Questions\
**Tags:** drag-controls\
**Created:** [September 1, 2021, 1:14pm UTC](https://discourse.threejs.org/t/drag-object-along-multiple-set-paths/29482 "2021-09-01T13:14:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark7](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mark7/32/14405_2.png) [@Mark7](https://discourse.threejs.org/u/Mark7)\
**Post date:** [September 1, 2021, 1:14pm UTC](https://discourse.threejs.org/t/drag-object-along-multiple-set-paths/29482/1 "2021-09-01T13:14:14Z")

</div>

Hello!  
I am trying to make a cube follow the path of the lines. As it is right now it can only follow the upper line:  
[https://jsfiddle.net/habm6spu/43/](https://jsfiddle.net/habm6spu/43/) .  
As far as i’ve read ([three.js docs](https://threejs.org/docs/#api/en/math/MathUtils.clamp)) you can only clamp the cube using 2 values (min,max) which i am using. This is actually used to create a boundary for the cube. So the clamp method creates a Vector3 that limits the object from being moved outside it. How can i make 4 of those Vector3, one for each line?
