Hi!! I have 20 spot positions with "Black Sprites", I need put on them in order other 20 "White Sprites"... When I click in any of the White Sprites I need these go to the first free Black Sprite, when I click in other White Sprite and these go to the next free White Sprite and continue until the end... I dont know how I can make this...
do you need them all to move, or just the one you click?
on click white sprite,
pick nearest black
pick by comparison, black.x</> white.x set white position to black
depends on direction they are moving
Develop games in your browser. Powerful, performant & highly capable.
I just need move the clicked white sprite... Now Im solve with an variable with the first black position and in each click y add to the variable the thistance to the next back sprite... Not is the best solution but works for now... Thank You!