Phase 4 – Star Navigation Prototype

After creating a video representation of the star navigation prototype:

Video of what the navigation would look like during gameplay
What’s really happening

I wanted to create a playable Unity version of this prototype, which is what I did in this video (Ignore the redness, that’s there so I can gauge the radius of the circle for the rotation).

The console is in the bottom left of the video

This version allows the player to look around both vertically and horizontally and is a more accurate depiction of how the finalised mechanic would look.

A and D are used to look left and right
W and S are used to look up and down
Space is used to decide where to go, the player is given ~5 degrees of leniency with their choice. Whether or not they are right can be seen in the console in the video.

But how does it work? I created two scripts, one that:

  • Rotates the ‘sky’ using the A and D keys
  • Stores the ‘sky’ rotation value and sets it to a number between 0 and 360
  • Upon ‘Space’ press the rotation value is compared to a ‘Direction value’ that can be set in the inspector

Another script:

  • Moves the camera up and down an axis between two values
    • I can change these values in the inspector that prevent the camera from moving away from the ‘sky’ asset

Leave a Reply

Your email address will not be published. Required fields are marked *