In our 3rd session we started to add more elements to our game. We
lit the scene using a three point lighting system, we explored
materials and added a background plane to our game.
We then created a script to make our ship move based on the horizontal and vertical axis:
using UnityEngine;using System.Collections;
public class PlayerController : MonoBehaviour {
public float moveHorizontal = 0; public float moveVertical = 0; public float speed = 10;
public float xMin,xMax,zMin,zMax;
public Vector3 movement = Vector3.zero;
void FixedUpdate () { moveHorizontal = Input.GetAxis ("Horizontal"); moveVertical = Input.GetAxis ("Vertical");
movement = new Vector3 (moveHorizontal,0,moveVertical);
transform.rigidbody.velocity = movement * speed; }
The game spaceship from game view. I feel exicted knowing that I made this and how this interactive software and learning it's attributes will come in handy someday.
No comments:
Post a Comment