How to solve it

Rotate both statues by using the weather vanes. Place them looking at each other to unlock the door.

How it works

This puzzle uses a RotatableObjectPuzzle component to handle its completion located in WeatherVanePuzzle.

The individual weathervanes objects use a custom component to rotate between different transforms. These transforms are identified by TransformReference component, which identifies each transform with an ID. For Weathervanes, these IDs are N, S, E, W

image.png

When the player decides to use a weathervane, one of the statues is selected in the RotatableObjectPuzzle

image.png

When the weathervane is stopped. It propagates the Transform ID (N, S, E, W) to the RotatableObjectPuzzle by using SetSelectedToDirection

image.png

This automatically makes the selected RotatableObject (StatueRed in this case) to rotate to the selected direction. After the rotation, the puzzle solution is checked. RotatableObjectPuzzle WeatherVanePuzzle expects the following solution.

image.png

When this solution is met, WeatherVanePuzzle.OnSolved gets called unlocking the door.