Skip to content

Commit e4da058

Browse files
authored
Adjusted project settings and unlocked mouse with camera explorer (#2)
1 parent 9f3471b commit e4da058

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

Overload-Showroom.ovproject

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
executable_name=Showroom
21
gravity=-9.810000
2+
executable_name=Showroom
33
x_resolution=1600
4-
multisampling=true
54
y_resolution=900
6-
start_scene=1_Sponza\Sponza.ovscene
5+
multisampling=true
76
fullscreen=false
7+
start_scene=1_Sponza\Sponza.ovscene
88
vsync=true
99
samples=4
1010
opengl_major=4
1111
opengl_minor=3
12-
dev_build=true
12+
dev_build=false

Scripts/SimpleFPSController.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@ function FPSController:OnAwake()
1717
self.defaultRotation = self.body:GetTransform():GetRotation()
1818
end
1919

20-
function FPSController:OnStart()
20+
function FPSController:OnEnable()
2121
if self.mouseLocked then
2222
Inputs.LockMouse()
2323
end
2424
end
2525

26+
function FPSController:OnDisable()
27+
Inputs.UnlockMouse()
28+
end
2629

2730
function FPSController:OnUpdate(deltaTime)
2831
-- Toggle mouse lock with Left ALT key

Scripts/SponzaExplorer.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ function SponzaExplorer:OnAwake()
5454
self.cameraFade:GetMaterialRenderer():SetUserMatrixElement(0, 0, 0.0)
5555
end
5656

57-
function SponzaExplorer:OnEnable()
58-
Inputs.LockMouse()
59-
end
60-
6157
function SponzaExplorer:OnUpdate(deltaTime)
6258
destPosition = self.destPositions[self.destionationIndex]
6359
destRotation = self.destRotations[self.destionationIndex]

0 commit comments

Comments
 (0)