When more than one ImageSprite is on a Canvas and those sprites can be dragged, then it is common for one sprite to 'capture' another if they touch. Once 'captured' the two are stuck together. To avoid this a few simple steps are required.
Ok,
CloseThis article has not yet passed wikiHow's quality review process. Learn more
CloseThis article has not yet passed wikiHow's quality review process. Learn more
EditSteps
-
1Get an idea of the whole project first. What we are going to do is add a special placeholder ImageSprite to the Canvas and test inside each of your ImageSprites' Dragged event blocks to make sure it is the one that is currently being dragged. If it is the current ImageSprite then it will allow itself to be dragged. If it is not the current ImageSprite then it will not react to the event This is best shown with images from the Screen Designer and Blocks Editor.
-
2Create PlaceHolderISP ImageSprite. Uncheck it's Visible property.
-
3
-
4Drag out TouchDown, TouchUp event blocks. For each ImageSprite, set their values as shown above.
-
5
-
6Your Canvas will now be free of ImageSprite cannibals!
Article Info
Did this article help you?
Yes
No