Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
山
山西检定流水线数字孪生项目
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨泽宇
山西检定流水线数字孪生项目
Commits
fd239afe
Commit
fd239afe
authored
Aug 13, 2024
by
潘梓豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新巡检
parent
fa6ae9b9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2445 additions
and
21 deletions
+2445
-21
TouristModeController.cs
Assets/Scripts/Components/TouristModeController.cs
+6
-2
FaceCamera.cs
Assets/Scripts/Components/UI/FaceCamera.cs
+26
-0
FaceCamera.cs.meta
Assets/Scripts/Components/UI/FaceCamera.cs.meta
+11
-0
1_Main.unity
Assets/_Scenes/1_Main.unity
+2362
-15
人工巡检.anim
Assets/_美术资源/动画/人工巡检/人工巡检.anim
+40
-4
No files found.
Assets/Scripts/Components/TouristModeController.cs
View file @
fd239afe
...
@@ -13,7 +13,9 @@ public class TouristModeController : MonoBehaviour
...
@@ -13,7 +13,9 @@ public class TouristModeController : MonoBehaviour
[
Space
]
[
Space
]
[
Header
(
"巡检视角设置"
)]
[
Header
(
"巡检视角设置"
)]
[
Tooltip
(
"固定摄像头"
)]
[
Tooltip
(
"固定摄像头"
)]
public
GameObject
FixCamera
;
public
GameObject
FixCamera
;
[
Tooltip
(
"巡检视觉"
)]
public
GameObject
InspectionCamera
;
[
Tooltip
(
"自由摄像头"
)]
[
Tooltip
(
"自由摄像头"
)]
public
GameObject
FreeCamera
;
public
GameObject
FreeCamera
;
[
Tooltip
(
"固定摄像头中动画的名字"
)]
[
Tooltip
(
"固定摄像头中动画的名字"
)]
...
@@ -131,7 +133,8 @@ public class TouristModeController : MonoBehaviour
...
@@ -131,7 +133,8 @@ public class TouristModeController : MonoBehaviour
public
void
EnterObserve
()
public
void
EnterObserve
()
{
{
ExitObserve
();
ExitObserve
();
FixCamera
.
SetActive
(
true
);
//FixCamera.SetActive(true);
InspectionCamera
.
SetActive
(
true
);
Player
.
BackToInitPosition
();
Player
.
BackToInitPosition
();
Player
.
IsPause
=
true
;
Player
.
IsPause
=
true
;
PauseOrResumeAnimator
();
PauseOrResumeAnimator
();
...
@@ -223,6 +226,7 @@ public class TouristModeController : MonoBehaviour
...
@@ -223,6 +226,7 @@ public class TouristModeController : MonoBehaviour
PauseOrResumeAnimator
();
PauseOrResumeAnimator
();
//FreeCamera.SetActive(false);
//FreeCamera.SetActive(false);
FixCamera
.
SetActive
(
false
);
FixCamera
.
SetActive
(
false
);
InspectionCamera
.
SetActive
(
false
);
Player
.
BackToInitPosition
();
Player
.
BackToInitPosition
();
Player
.
IsPause
=
false
;
Player
.
IsPause
=
false
;
Player
.
AutoRotate
=
false
;
Player
.
AutoRotate
=
false
;
...
...
Assets/Scripts/Components/UI/FaceCamera.cs
0 → 100644
View file @
fd239afe
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
FaceCamera
:
MonoBehaviour
{
private
Transform
cameraTransform
;
private
void
Start
()
{
cameraTransform
=
Camera
.
main
.
transform
;
}
private
void
Update
()
{
// 获取摄像机的正方向向量
Vector3
cameraForward
=
Camera
.
main
.
transform
.
forward
;
// 将UI的正方向与摄像机的正方向对齐
transform
.
forward
=
cameraForward
;
transform
.
rotation
=
Quaternion
.
Euler
(
0f
,
transform
.
rotation
.
eulerAngles
.
y
,
transform
.
rotation
.
eulerAngles
.
z
);
}
}
Assets/Scripts/Components/UI/FaceCamera.cs.meta
0 → 100644
View file @
fd239afe
fileFormatVersion: 2
guid: 3ed83d4864ee1f24cbbe26198a1e5210
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/_Scenes/1_Main.unity
View file @
fd239afe
This diff is collapsed.
Click to expand it.
Assets/_美术资源/动画/人工巡检/人工巡检.anim
View file @
fd239afe
...
@@ -19,7 +19,7 @@ AnimationClip:
...
@@ -19,7 +19,7 @@ AnimationClip:
m_Curve
:
m_Curve
:
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
0
time
:
0
value
:
{
x
:
5
,
y
:
-90
,
z
:
0
}
value
:
{
x
:
11.08
,
y
:
-90
,
z
:
0
}
inSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
inSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
outSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
outSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
tangentMode
:
0
tangentMode
:
0
...
@@ -63,7 +63,7 @@ AnimationClip:
...
@@ -63,7 +63,7 @@ AnimationClip:
m_Curve
:
m_Curve
:
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
0
time
:
0
value
:
{
x
:
27.75
,
y
:
4
,
z
:
-20.28
}
value
:
{
x
:
27.75
,
y
:
7.26
,
z
:
-20.28
}
inSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
inSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
outSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
outSlope
:
{
x
:
0
,
y
:
0
,
z
:
0
}
tangentMode
:
0
tangentMode
:
0
...
@@ -79,6 +79,15 @@ AnimationClip:
...
@@ -79,6 +79,15 @@ AnimationClip:
weightedMode
:
0
weightedMode
:
0
inWeight
:
{
x
:
0.33333334
,
y
:
0.33333334
,
z
:
0.33333334
}
inWeight
:
{
x
:
0.33333334
,
y
:
0.33333334
,
z
:
0.33333334
}
outWeight
:
{
x
:
0.33333334
,
y
:
0.33333334
,
z
:
0.33333334
}
outWeight
:
{
x
:
0.33333334
,
y
:
0.33333334
,
z
:
0.33333334
}
-
serializedVersion
:
3
time
:
35.05
value
:
{
x
:
-15.49
,
y
:
7.26
,
z
:
-20.278866
}
inSlope
:
{
x
:
0
,
y
:
0
,
z
:
0.00030263266
}
outSlope
:
{
x
:
0
,
y
:
0
,
z
:
0.00030263266
}
tangentMode
:
0
weightedMode
:
0
inWeight
:
{
x
:
0.33333334
,
y
:
0.33333334
,
z
:
0.33333334
}
outWeight
:
{
x
:
0.33333334
,
y
:
0.33333334
,
z
:
0.33333334
}
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
50
time
:
50
value
:
{
x
:
-15.49
,
y
:
4
,
z
:
13.84
}
value
:
{
x
:
-15.49
,
y
:
4
,
z
:
13.84
}
...
@@ -173,6 +182,15 @@ AnimationClip:
...
@@ -173,6 +182,15 @@ AnimationClip:
weightedMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
inWeight
:
0.33333334
outWeight
:
0.33333334
outWeight
:
0.33333334
-
serializedVersion
:
3
time
:
35.05
value
:
-15.49
inSlope
:
0
outSlope
:
0
tangentMode
:
136
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
50
time
:
50
value
:
-15.49
value
:
-15.49
...
@@ -205,7 +223,7 @@ AnimationClip:
...
@@ -205,7 +223,7 @@ AnimationClip:
m_Curve
:
m_Curve
:
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
0
time
:
0
value
:
4
value
:
7.26
inSlope
:
0
inSlope
:
0
outSlope
:
0
outSlope
:
0
tangentMode
:
136
tangentMode
:
136
...
@@ -221,6 +239,15 @@ AnimationClip:
...
@@ -221,6 +239,15 @@ AnimationClip:
weightedMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
inWeight
:
0.33333334
outWeight
:
0.33333334
outWeight
:
0.33333334
-
serializedVersion
:
3
time
:
35.05
value
:
7.26
inSlope
:
0
outSlope
:
0
tangentMode
:
136
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
50
time
:
50
value
:
4
value
:
4
...
@@ -269,6 +296,15 @@ AnimationClip:
...
@@ -269,6 +296,15 @@ AnimationClip:
weightedMode
:
0
weightedMode
:
0
inWeight
:
0.33333334
inWeight
:
0.33333334
outWeight
:
0.33333334
outWeight
:
0.33333334
-
serializedVersion
:
3
time
:
35.05
value
:
-20.278866
inSlope
:
0.00030263266
outSlope
:
0.00030263266
tangentMode
:
136
weightedMode
:
0
inWeight
:
0.33333334
outWeight
:
0.33333334
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
50
time
:
50
value
:
13.84
value
:
13.84
...
@@ -301,7 +337,7 @@ AnimationClip:
...
@@ -301,7 +337,7 @@ AnimationClip:
m_Curve
:
m_Curve
:
-
serializedVersion
:
3
-
serializedVersion
:
3
time
:
0
time
:
0
value
:
5
value
:
11.08
inSlope
:
0
inSlope
:
0
outSlope
:
0
outSlope
:
0
tangentMode
:
136
tangentMode
:
136
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment