File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Gems/RobotecSpectatorCamera/Code/Source/SpectatorCamera Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ namespace RobotecSpectatorCamera
115
115
// Capture the initial mouse position and cursor state
116
116
m_initialMousePosition = GetCurrentMousePosition ();
117
117
m_ignoreNextMovement = true ; // Flag to ignore the next mouse movement preventing jump on re-centering
118
+ AzFramework::InputSystemCursorRequestBus::Event (
119
+ AzFramework::InputDeviceMouse::Id,
120
+ &AzFramework::InputSystemCursorRequests::SetSystemCursorState,
121
+ AzFramework::SystemCursorState::ConstrainedAndHidden);
118
122
}
119
123
else if (inputChannel.IsStateEnded ())
120
124
{
@@ -128,6 +132,10 @@ namespace RobotecSpectatorCamera
128
132
129
133
// Update m_lastMousePosition to the restored position to prevent the jump on the next rotation start
130
134
m_lastMousePosition = m_initialMousePosition;
135
+ AzFramework::InputSystemCursorRequestBus::Event (
136
+ AzFramework::InputDeviceMouse::Id,
137
+ &AzFramework::InputSystemCursorRequests::SetSystemCursorState,
138
+ AzFramework::SystemCursorState::ConstrainedAndVisible);
131
139
}
132
140
}
133
141
You can’t perform that action at this time.
0 commit comments