Unity Space Shooter Lesson 1 Set Background and Moving of the Player - jasonweibel/HyperStream-Unity GitHub Wiki

Hyperstream : Unity Space Shooter - Lesson 1 - Set Background and Moving of the Player

Reference

Unity Tutorial - https://unity3d.com/earn/tutorials/projects/space-shooter/moving-the-player?playlist=17147

Set Background

  1. Open BGScroller script in Visual Studio

  2. Uncomment scrollSpeed and tileSizeZ variables.

  3. Uncomment Update method

  4. Open Unity project

  5. Set Scroll Speed and Tile Size Z values.
    Scroll Speed = -0.25
    Tile Size Z = 30

  6. Let students play game and mess with these values.

Final Background - BG Scroller script values

Setup Player Movement

  1. Open PlayerController script in Visual Studio

  2. Uncomment speed and tilt variables

  3. Uncomment FixedUpdate method

  4. Open Unity Project

  5. Select Player in Hierarchy window and set the Speed and Tilt. 

    1. Tilt = 5

    2. Speed = 10

  6. Let students play game and mess with these values.

Final Player - Player Controller Script Values

Attachments:

image2017-7-12_12-17-38.png (image/png)
image2017-7-12_12-17-58.png (image/png)
image2017-7-12_12-20-7.png (image/png)
image2017-7-12_12-21-27.png (image/png)
image2017-7-12_12-21-47.png (image/png)
image2017-7-12_12-23-24.png (image/png)