O'Reilly logo

Unity 3D Game Development by Example by Ryan Henson Creighton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 Game Object, to make her face the proper direction.

  1. In the Animation window, go to frame 100. This is 20 frames before our next 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required