Hello!
I’m making a drag and drop dress up game and I’ve got everything basically working correctly but I’d like to make it so that the clickable/draggable area of each object is more specific.
As it is now, since there are a lot of overlapping objects, when you try to click a shirt or something you often end up picking up something else nearby instead of the one that you want (often over and over so you have to move a bunch of stuff out of the way just to grab something that was clearly visible from the beginning)
Is there any way to customize the shape of the clickable area (similar to how you can customize the hitbox)? The image files already have all the extra trimmed off, the problem is that the clickable area is a rectangle while the object is not.
You can work around with it, for example create a new object named “Hitbox” and assign this with a draggable behavior. After that add this action, Position X n Y of “YourObject” to Hitbox.X() and Hitbox.Y(). Dont add condition.
Now just adjust your hitbox to what fills your desire. Hope this helps
Thanks for your reply!
Pardon my ignorance, just trying to understand before I try to implement this- so if I did it this way I would have two sprites for every item in my game, where one is unseen and draggable with a custom shaped hitbox, while the other one is my image and is not “draggable” per se but is attached to the other object which is? Is that correct?
Thanks for the link! I don’t think this is quite what I’m looking to do (as a kid when I played these games I always preferred the ones where you fully had to position the clothing yourself, I think because it feels more hands-on) but it might come in handy in the future.