Questions about First Person Shooter

  1. In some cases, there can be more than one pointer, especially when enabling raw mouse support. 0 always refers to the system mouse pointer.

  2. Well, you put 0 in movePointer because you want to move the aforementioned system pointer.

The reason why there’s an “if” is that movePointer isn’t guaranteed to succeed at moving the pointer. If the mouse is outside the window, or if the window is minimized, the operating system won’t allow Panda to move the pointer. So, if it fails, it returns False. In this case, you usually don’t want to keep spinning the camera around endlessly, so the code decides not to update the camera unless it succeeds in moving the pointer.