Is there a way to only be able to drag an object along a line?

Hi,
I’m trying to make a game where you drag a object along a few lines, and how can I make it so that I can only drag the object along the line and not anywhere on the screen?
Thanks, gnajom3

4 Likes

Hi @gnajom3 :mechanical_arm: , welcome to the our forum! :slightly_smiling_face: Try turn on the physics for the object, turn off the gravity and block the Y axis

3 Likes

If you want the object to move along the horizontal axis, then turn on the physics, disable the gravity, and lock the Y-Position.

If you want the object to move along the vertical axis, then turn on the physics, disable the gravity, and lock the X-Position

4 Likes

Here’s a related idea: a sprite that follows a looping path created with Move Recorder.

https://forum.getready.io/t/make-a-sprite-disconnect-from-a-looping-move-recorder-path-illusion/2300

@Suzzy-Grey also posted a game idea involving multiple colored paths for little cars to follow, but I wasn’t able to find that post. If I find it later I’ll update.

4 Likes