At the start of my program, I have SDL_SetRelativeMouseMode() set to true. I have a camera that uses SDL_GetRelativeMouseState() to get the mouse movement for calculating the view direction. When I press escape, I disable SDL_SetRelativeMouseMode() so I can edit settings within an ImGui window. When I press escape again, I re-enable SDL_SetRelativeMouseMode() to capture my cursor for the camera movement.
My question is, how do I disregard mouse movements that happen while I’m tinkering with my ImGui window? When I re-enable SDL_SetRelativeMouseMode() to capture my cursor, my camera jolts to the new mouse location. I want my camera direction to be the same as when I first pressed escape.
Does this make sense? I’m pretty new to SDL so any help is appreciated.