Gamespace: Windmill

I created the functionality for the windmill before re-colouring the assets.
I added a rotating windmill to add more obstacles to the gamespace making collecting the items more difficult for the player.



Windmill Game View


The inspector for one of the windmill arms shows that the 'RotatingWindmill' script is attached to it and the speed of the windmill arm is going at 0.44.
Additionally, the other windmill arm has this script attached to it in the inspector and is also travelling at a speed of 0.44.


Windmill Arm Inspector


The 'RotatingWindmill' script allows the windmill arms to rotate around a point at a speed per second.
The float variable 'speed' has been made public meaning that this value is editable outside of the code.
The rotation command is transform.Rotate. A new 3D vector has been created to tell the windmill arm to rotate at a specified speed on the X-axis and nothing on the Y or Z-axis as these values have been set to zero.


Rotating Windmill Script

Comments

Popular posts from this blog

Unity Project 4: Ball platformer game

[Research] Traditional Poster Design (4CTA1214)