Fix camera arm and win scene issue #346

Merged
glencelow merged 1 commits from SP3-141-Camera-System into main 2023-02-04 02:44:32 +08:00
4 changed files with 16 additions and 5 deletions
Showing only changes of commit d1ae9b3756 - Show all commits

View File

@ -4317,7 +4317,7 @@
Scripts: Scripts:
- Type: GameManager - Type: GameManager
Enabled: true Enabled: true
winScene: 92009475 winScene: 86098106
loseScene: 91685359 loseScene: 91685359
currGameState: 0 currGameState: 0
totalItemCount: 0 totalItemCount: 0
@ -5089,7 +5089,7 @@
throwForce: [8, 10, 8] throwForce: [8, 10, 8]
cameraArmOffSet: [0, 0.25, 0] cameraArmOffSet: [0, 0.25, 0]
delayTimer: 1 delayTimer: 1
aimingLength: 0.5 aimingLength: 0.899999976
throwItem: false throwItem: false
rayDistance: 0.5 rayDistance: 0.5
- EID: 65733 - EID: 65733
@ -5135,7 +5135,7 @@
Scripts: Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera - Type: SHADE_Scripting.ThirdPersonCamera
Enabled: true Enabled: true
armLength: 1 armLength: 2
turnSpeedPitch: 0.300000012 turnSpeedPitch: 0.300000012
turnSpeedYaw: 0.5 turnSpeedYaw: 0.5
pitchClamp: 45 pitchClamp: 45

View File

@ -9733,6 +9733,7 @@
pitchClamp: 45 pitchClamp: 45
inverseXControls: false inverseXControls: false
inverseYControls: false inverseYControls: false
lowerClamp: 5
- EID: 9 - EID: 9
Name: PlayerBag Name: PlayerBag
IsActive: true IsActive: true

View File

@ -36,6 +36,9 @@
Mesh: 141771688 Mesh: 141771688
Material: 129138332 Material: 129138332
IsActive: true IsActive: true
UI Component:
Canvas ID: 1
IsActive: true
Scripts: ~ Scripts: ~
- EID: 5 - EID: 5
Name: Main Menu Button Name: Main Menu Button
@ -56,6 +59,9 @@
Hovered Texture: 55999018 Hovered Texture: 55999018
Clicked Texture: 66382894 Clicked Texture: 66382894
IsActive: true IsActive: true
UI Component:
Canvas ID: 1
IsActive: true
Scripts: Scripts:
- Type: ChangeSceneButton - Type: ChangeSceneButton
Enabled: true Enabled: true
@ -79,6 +85,9 @@
Hovered Texture: 65045286 Hovered Texture: 65045286
Clicked Texture: 58607560 Clicked Texture: 58607560
IsActive: true IsActive: true
UI Component:
Canvas ID: 1
IsActive: true
Scripts: Scripts:
- Type: QuitButton - Type: QuitButton
Enabled: true Enabled: true

View File

@ -17,6 +17,7 @@ namespace SHADE_Scripting
public float pitchClamp = 45.0f; public float pitchClamp = 45.0f;
public bool inverseXControls = false; public bool inverseXControls = false;
public bool inverseYControls = false; public bool inverseYControls = false;
public float lowerClamp = 5.0f;
protected override void awake() protected override void awake()
{ {
@ -58,9 +59,9 @@ namespace SHADE_Scripting
{ {
arm.Pitch = pitchClamp; arm.Pitch = pitchClamp;
} }
else if (arm.Pitch < 0) else if (arm.Pitch < lowerClamp)
{ {
arm.Pitch = 0; arm.Pitch = lowerClamp;
} }
} }
} }