File tree Expand file tree Collapse file tree 3 files changed +29
-14
lines changed Expand file tree Collapse file tree 3 files changed +29
-14
lines changed Original file line number Diff line number Diff line change @@ -3322,17 +3322,9 @@ MonoBehaviour:
3322
3322
assetGuid :
3323
3323
m_Mesh : {fileID: 160132371}
3324
3324
m_IsSelectable : 1
3325
- m_SelectedFaces : 00000000
3326
- m_SelectedEdges :
3327
- - a : 0
3328
- b : 1
3329
- - a : 2
3330
- b : 0
3331
- - a : 1
3332
- b : 3
3333
- - a : 3
3334
- b : 2
3335
- m_SelectedVertices : 00000000010000000200000003000000
3325
+ m_SelectedFaces :
3326
+ m_SelectedEdges : []
3327
+ m_SelectedVertices :
3336
3328
--- !u!4 &96482899
3337
3329
Transform :
3338
3330
m_ObjectHideFlags : 0
@@ -6612,7 +6604,7 @@ MonoBehaviour:
6612
6604
m_EditorClassIdentifier :
6613
6605
rayTracer : {fileID: 7200000, guid: 5d3ecc91e10e8bd4783d493b91f7f36b, type: 3}
6614
6606
directionalLight : {fileID: 705507994}
6615
- skyBoxTexture : {fileID: 2800000, guid: c1d47be90deb5584486e602ba3a9c622 , type: 3}
6607
+ skyBoxTexture : {fileID: 2800000, guid: a105db47e882af24481ac6b550f184aa , type: 3}
6616
6608
--- !u!1001 &1306028894
6617
6609
PrefabInstance :
6618
6610
m_ObjectHideFlags : 0
Original file line number Diff line number Diff line change @@ -21,6 +21,9 @@ public class AddToPathEngine : MonoBehaviour
21
21
public Vector3 emissionColor = new Vector3 ( 0f , 0f , 0f ) ;
22
22
public float emissionStrength = 0.0f ;
23
23
24
+ Vector3 centerPosition ;
25
+ float radius ;
26
+
24
27
[ HideInInspector ]
25
28
public Vector3 emission ;
26
29
@@ -44,9 +47,28 @@ private void OnEnable()
44
47
emission = emissionStrength * emissionColor ;
45
48
46
49
RayTracing . RegisterObject ( this ) ;
50
+
51
+
47
52
}
53
+
48
54
private void OnDisable ( )
49
55
{
50
56
RayTracing . UnregisterObject ( this ) ;
51
57
}
58
+
59
+ Vector3 meshAverage ( Mesh mesh )
60
+ {
61
+ Vector3 [ ] vertexList = mesh . vertices ;
62
+
63
+ Vector3 average = Vector3 . zero ;
64
+ int count = 0 ;
65
+
66
+ foreach ( Vector3 vertex in vertexList )
67
+ {
68
+ average += vertex ;
69
+ count ++ ;
70
+ }
71
+
72
+ return average / count ;
73
+ }
52
74
}
Original file line number Diff line number Diff line change @@ -221,9 +221,10 @@ void Update()
221
221
}
222
222
223
223
Vector3 currentPosition = camera . transform . localPosition ;
224
+ Vector3 currentRotation = GetComponent < Camera > ( ) . transform . localEulerAngles ;
224
225
225
- camera . transform . Rotate ( new Vector3 ( 0 , Input . GetAxis ( "Horizontal" ) * rotationSpeed * Time . deltaTime , 0 ) ) ;
226
- camera . transform . Rotate ( new Vector3 ( - Input . GetAxis ( "Vertical" ) * rotationSpeed * Time . deltaTime , 0 , 0 ) ) ;
226
+ currentRotation = currentRotation + new Vector3 ( - Input . GetAxis ( "Vertical" ) , Input . GetAxis ( "Horizontal" ) , 0 ) * rotationSpeed * Time . deltaTime ;
227
+ camera . transform . localEulerAngles = currentRotation ;
227
228
228
229
if ( Input . GetAxis ( "Horizontal" ) != 0 || Input . GetAxis ( "Vertical" ) != 0 )
229
230
{
You can’t perform that action at this time.
0 commit comments