Unity Project 4: Ball platformer game
Finished game displayed in the scene view.
Scene view |
Assets |
Uses Rigidbody so that the ball can use physics (Gravity) therefore it doesn't fall through the ground.
The 'Rolling Ball' script is attached to the ball which adds force to the ball.
Ball Inspector |
Scene view displaying the invisible cube object which can be used as a trigger for an event.
Scene view |
Console Message |
The invisible cube that is attached to the 'Trigger' script.
When an object does not have a mesh renderer, the object becomes invisible as we cannot see it due to it not having a mesh.
Cube Inspector |
Field of view changed, so that the ball can be seen from a slightly different angle.
Follow target script also attached allowing a first person type view of the ball as the camera is set to follow the ball's movement. The camera can be moved so that the ball is visible when moving.
This allows the speed of rotation to be changed and therefore have increased the value to 0.44.
Arm 2 of the windmill has the same values and script attached in its inspector however, the object is turned 90 degrees in the scene view so that both arms rotate like a windmill.
Moving platform inspector has the 'Moving Platform' script attached which allows the platform to move up and down repeatedly.
Arm 1 Inspector |
Moving platform inspector has the 'Moving Platform' script attached which allows the platform to move up and down repeatedly.
Moving Platform Inspector |
Comments