#(SOLVED) Dragging an object issue

16 messages · Page 1 of 1 (latest)

finite pasture
#

okay so i fixed the issue this thread was originally for but now i have a new question

#

how would i make it so an object that can be clicked and dragged can only follow along a specific path?

#

the item in question is a gear shift if that helps to understand the issue

#

right now i have an object that is able to be clicked and dragged on a grid but it can go anywhere on screen

#

how do i confine it to a strict path

#

im thinking this could maybe be done with a path2d but im not exactly sure how

#

heres the code for my drag and drop object

reef geyser
#

puts a ward

lone carbon
#

Hmm, but that doesn't take care of the different gear grooves. For a simple game I might just make the gear path out of collision polygons, and stick some areas in the notches that detect entry and change gears or whatever it is.

finite pasture
#

idk if theres a way to close a thread but

#

issue resolved

reef geyser
#

I think that you can here:

#

what most people do is just change the name to (solved) so others can read it in case they had the same issue

finite pasture
#

ohhh oky cool thank u