Objects positioning: how to check

  1. We have some shuffled items on display.

  2. A player should move them into a correct order.

I need to perform an equality test of current items coordinates and desired items coordinates, stored in a table.

Is it possible to make?

Yes.

One easy way to do this is:

  1. Place objects in correct position when you create them.

  2. On the objects, add fields denoting the x0 and y0 position (solved position).

  3. Shuffle position of objects.

Now, when the user places the objects you can check if the object is moved onto the solved position or near enough to it.

That is how my very old but still semi-relevant jigsaw puzzle template are made: https://sellfy.com/p/EkC2/

I answered an old question back in 2015 whose answer code is here:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/05/dollClothes.zip

While it wasn’t the same question, the solution is still applicable if a little different from my answer above.

https://www.youtube.com/watch?v=nJIjvx5S-Jo&feature=youtu.be

Thank you, roaminggamer.

Yes.

One easy way to do this is:

  1. Place objects in correct position when you create them.

  2. On the objects, add fields denoting the x0 and y0 position (solved position).

  3. Shuffle position of objects.

Now, when the user places the objects you can check if the object is moved onto the solved position or near enough to it.

That is how my very old but still semi-relevant jigsaw puzzle template are made: https://sellfy.com/p/EkC2/

I answered an old question back in 2015 whose answer code is here:

https://github.com/roaminggamer/RG_FreeStuff/raw/master/AskEd/2015/05/dollClothes.zip

While it wasn’t the same question, the solution is still applicable if a little different from my answer above.

https://www.youtube.com/watch?v=nJIjvx5S-Jo&feature=youtu.be

Thank you, roaminggamer.