Puzzle open door ?

Hello Unity Answer Community,

I was wondering if you could use a puzzle like this one http://bit.ly/14MYOlO to open a door, so when the player walks up to the puzzle on the wall and move the puzzle around so all black is on one side and all whites are on the other side the door will open. (the game is 3d first person)

I was wondering how you would do this in Javascript or C# ?

Thank you for your time and help,
Have a nice day/night.

You will need a way to test that the puzzle has been successfully completed.

Once this has happened, you can use this event to change the state of the door.

If the door has an animation, then the success event will play that animation.

If the door has a variable holding whether it is locked (locked = true) then the event will change this to (locked = false).