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 mu...