Friday, 25 April 2014

Rotating Pieces Puzzle

A puzzle idea that one of my group members came up with was the idea of having objects blocking the path of the player so that they cannot continue until they have been moved. The problem is however that these objects blocking the path rotate, so the player needs to rotate them until they are at the right angle so that they can the progress forward on to the next stage of the level. 

The script written rotates the object, there is no animation on the object - which was an idea we had at the beginning. 


In the screenshot above it shows the beginning scene.


When the player walks up to the object, all they have to do is click the left mouse button on the object and it rotates it to another position.


Each time the player clicks the object it will change its rotation, the player can do this until it is at the right angle for them to continue on through the level. 


Above is another screenshot of another rotation.


Here is a screenshot of the object behind the original one rotating as well. This script can now be applied to any object that we would like to be rotated. 

Below is a photo of the script that rotates the object.


Below is a script for when the puzzle is complete.


This particular puzzle I found quite challenging, and I did need help from one of my lecturers - however this helped me understand a lot more of what was happening within the code as he was able to explain it to me face to face.

No comments:

Post a Comment