So I’ve looked through some camera classes and none of them seem to address the fact that you should be able to keep rotating even if your mouse hits the edge of the screen. I’ve been doing a hack job to make it work in the past, but I was wondering what the correct way of actually doing it was.
Share
The best way is to use mouse api that provides you both relative and absolute mouse movement.
“Absolute” is current cursor position, “relative” means difference between current and previous position. For rotating camera (when cursor is at the edge) you should use “relative” mouse movement.
SDL can do that (but only if it “grabbed” mouse), and DirectInput can also do it. I don’t remember if “relative cursor movement” data is available via standard system APIs, though.