From db1cc7501977651fe5f8503e4599c82d9fdc28fd Mon Sep 17 00:00:00 2001 From: fez5587 Date: Sun, 5 Jul 2020 10:22:16 -0500 Subject: [PATCH] Liftoff Directions --- Assets/Rocket.cs | 4 +++- Assets/Scenes/Level 1.unity | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/Rocket.cs b/Assets/Rocket.cs index 01c3156..690aa20 100644 --- a/Assets/Rocket.cs +++ b/Assets/Rocket.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Collections.Specialized; using System.Runtime.InteropServices; +using System.Security.Cryptography; using UnityEngine; @@ -26,15 +27,16 @@ public class Rocket : MonoBehaviour if (Input.GetKey(KeyCode.Space)) { rigidbody.AddRelativeForce(Vector3.up); -// AddRelativeForce(Vector3.up); } if (Input.GetKey(KeyCode.A)) { print("LeftPressed"); + transform.Rotate(Vector3.forward); } else if (Input.GetKey(KeyCode.D)) { print("RightPressed"); + transform.Rotate(-Vector3.forward); } } } diff --git a/Assets/Scenes/Level 1.unity b/Assets/Scenes/Level 1.unity index c481892..108b486 100644 --- a/Assets/Scenes/Level 1.unity +++ b/Assets/Scenes/Level 1.unity @@ -209,7 +209,7 @@ Rigidbody: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2126072322} serializedVersion: 2 - m_Mass: 0.1 + m_Mass: 0.3 m_Drag: 0 m_AngularDrag: 0.05 m_UseGravity: 1