kgoedert Posted October 7, 2015 Share Posted October 7, 2015 Hi, I just started trying out phaser. I would like to build a simple game where I have some clothes items like a shoe, a hat... and I have a doll which I should dress up with this items. So far, I was able to place all the items on the game, and make the clothing items draggable. My question is: how can I define that a specific region of the doll can have an item dragged into it, like the head, but not other parts, like the hands or body? Thank you Kelly Link to comment Share on other sites More sharing options...
rich Posted October 7, 2015 Share Posted October 7, 2015 There are lots of ways to approach this. Personally I would use a hidden 'hit area' on both the piece being dragged and the 'body'. Two circles would be good. Then when the item is dropped check if they intersect at all, and if they do you've got a well placed item you can move to where it should be. Link to comment Share on other sites More sharing options...
Recommended Posts