Skip to content

Commit b486ebd

Browse files
committed
changed to proposal 2
1 parent 6e01bb1 commit b486ebd

File tree

4 files changed

+457
-457
lines changed

4 files changed

+457
-457
lines changed

Assets/Samples/UIvsGameInput/UIvsGameInputHandler.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void Update()
137137
transform.rotation = default;
138138

139139
// When using a pointer-based control scheme, we engage camera look explicitly.
140-
if (m_ControlStyle != ControlStyle.GamepadJoystick && m_LookEngageAction.WasPressedThisFrame() && IsPointerInsideScreen())
140+
if (m_ControlStyle != ControlStyle.GamepadJoystick && m_LookEngageAction.WasPressedThisRenderingFrame() && IsPointerInsideScreen())
141141
EngageCameraControl();
142142

143143
// With gamepad/joystick, we can freely rotate the camera at any time.
@@ -166,14 +166,14 @@ public void Update()
166166
if (m_Mouse != null)
167167
m_MousePositionToWarpToAfterCursorUnlock = m_MousePositionToWarpToAfterCursorUnlock.Value + m_Mouse.delta.ReadValue();
168168

169-
if (m_CancelAction.WasPressedThisFrame() || !m_LookEngageAction.IsPressed())
169+
if (m_CancelAction.WasPressedThisRenderingFrame() || !m_LookEngageAction.IsPressed())
170170
DisengageCameraControl();
171171

172172
break;
173173

174174
case State.InMenu:
175175

176-
if (m_CancelAction.WasPressedThisFrame())
176+
if (m_CancelAction.WasPressedThisRenderingFrame())
177177
OnContinueClicked();
178178

179179
break;

0 commit comments

Comments
 (0)