Time for action – you spin me right round

Let's correct that little issue of the nurse careening sideways and backwards through the hallway by adding rotation values for the runner GameObject, to make her face the proper direction.

  1. In the Animation window, go to frame 100. This is 20 frames before our second keyframe.
  2. Click on the little button with the white diamond and plus symbol—the "add keyframe" button—to tell Unity to remember the runner's position/rotation/scale on this frame.
    Time for action – you spin me right round
  3. Go to frame 120.
  4. Enter a Rotation.y value of -90 to face the camera down the next hallway.
  5. Move the runner down the second hallway just a bit, maybe to Position.x 6.0

Get Unity 4.x Game Development by Example Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.