Week 3 Practical

In my Week 3 practical class, I was asked to create three different scenes which reflected the addition of gravity, jumping, inertia and acceleration.

Scene 1: 
My first scene is a 2D race mini-game where the user (cube) races against two AI cubes. The AI cubes have random acceleration and max speeds, which remains constant throughout runtime.

The player control can stop with inertia by releasing the movement key (KeyCode.D) or by pressing the space-bar. The script includes capping the Velocity and stopping the movement progressively.

This scene demonstrates the concepts of Movement on a single axis, Velocity, Acceleration and Speed, and Inertia.





Scene 2:
My second scene is a mini-game where the user controls a spaceship (cube) which flies across the world. It uses a Debug.DrawLine to show the distance between the current position and the intended direction (calculated by Velocity * Time.deltaTime).

This scene demonstrates the concepts of movement on multiple axis's, Velocity, Acceleration and Direction.



Scene 3:
My third scene is a generic movement scene where the player controls a cube. The movement contains jumping, and the use of gravity without Rigidbody and a layer.

The gravity is setup by checking if it is touching an object on a custom user layer. If so, it is touching the ground, and sets a static velocity value.

This scene demonstrates the concepts of movement, velocity, acceleration, jumping and gravity.


Comments

Popular posts from this blog

Final Game #4: Conclusion

Final Game #3: Friction Resistance, Momentum and Local Platforms

Final Game #1: Distance, Displacement, Acceleration, Velocity and Gravity