Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class UserInput : MonoBehaviour {
- SpacecraftControl spacecraftControl;
- // Use this for initialization
- void Start () {
- spacecraftControl = GetComponent<SpacecraftControl> () ;
- }
- // Update is called once per frame
- void FixedUpdate () {
- //float roll = Input.GetAxis("Yaw");
- float roll = Input.GetAxis("Horizontal");
- float pitch = Input.GetAxis("Vertical");
- //float yaw = Input.GetAxis("Horizontal");
- bool airBrakes = Input.GetButton("Fire1");
- float Throttle = Input.GetAxis("Throttle");
- spacecraftControl.Move(roll, pitch, 0, Throttle, airBrakes);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement