File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -289,15 +289,15 @@ Prefab:
289
289
m_Modifications :
290
290
- target : {fileID: 4429351561463374, guid: 30da5df0ee3ec8247ac02c74ea8e0a34, type: 2}
291
291
propertyPath : m_LocalPosition.x
292
- value : -0.09134564
292
+ value : 0
293
293
objectReference : {fileID: 0}
294
294
- target : {fileID: 4429351561463374, guid: 30da5df0ee3ec8247ac02c74ea8e0a34, type: 2}
295
295
propertyPath : m_LocalPosition.y
296
- value : 1.0009999
296
+ value : 1.66
297
297
objectReference : {fileID: 0}
298
298
- target : {fileID: 4429351561463374, guid: 30da5df0ee3ec8247ac02c74ea8e0a34, type: 2}
299
299
propertyPath : m_LocalPosition.z
300
- value : -0.25569773
300
+ value : 0
301
301
objectReference : {fileID: 0}
302
302
- target : {fileID: 4429351561463374, guid: 30da5df0ee3ec8247ac02c74ea8e0a34, type: 2}
303
303
propertyPath : m_LocalRotation.x
@@ -334,7 +334,7 @@ Rigidbody:
334
334
m_PrefabInternal : {fileID: 0}
335
335
m_GameObject : {fileID: 1909277555}
336
336
serializedVersion : 2
337
- m_Mass : 1
337
+ m_Mass : 0.2
338
338
m_Drag : 0
339
339
m_AngularDrag : 0.05
340
340
m_UseGravity : 1
Original file line number Diff line number Diff line change 4
4
using UnityEngine ;
5
5
6
6
public class Rocket : MonoBehaviour {
7
-
7
+
8
+ Rigidbody rigidbody ;
9
+
8
10
// Use this for initialization
9
11
void Start ( )
10
12
{
11
-
13
+ rigidbody = GetComponent < Rigidbody > ( ) ;
12
14
}
13
15
14
16
// Update is called once per frame
@@ -21,7 +23,7 @@ private void ProcessInput()
21
23
{
22
24
if ( Input . GetKey ( KeyCode . Space ) )
23
25
{
24
- print ( "Thrusting" ) ;
26
+ rigidbody . AddRelativeForce ( Vector3 . up ) ;
25
27
}
26
28
if ( Input . GetKey ( KeyCode . A ) && ! Input . GetKey ( KeyCode . D ) )
27
29
{
You can’t perform that action at this time.
0 commit comments