The SortObjectsPuzzle component can be used for puzzles where placeable objects have to be arranged in a specific order.

The main difference with a PlaceObjectsPuzzle is that objects will be swapped if an already taken slot is selected.

In the PuzzlePack 1, this is used in the BookSorting puzzle, where books have to be arranged in a specific order to get the word ISLAND.

Defining placing slots

Similarly to PlaceObjects puzzle, add the component PlaceableObjectSlot to the gameObjects to which the placeable objects will be moved to.

Untitled

Defining placeable objects

Similarly to PlaceObjects puzzle, add the component PlaceableObject to the gameObjects that will be moved

Untitled

Specifying the solution

On the SortObjectsPuzzle component arrange the placeable objects in order in the Solution field.

NOTE: All books are called the same in BookSorting puzzle due to the Animator (located on the slot) using that path for the animation. Otherwise the same slot animation wouldn’t work on all books.

Untitled

Moving objects between slots

To move the books simply select 2 slots sequentially by calling the SelectSlot method of SortObjectsPuzzle. This can be done from a 3D interactive, a choice or code.

Untitled