Until now UE4 does not use the "real" relative mouse movement which SDL2 provides already in the version 2.0.4. That means SDL2 is calculating internal the rel. mouse movement and provides it via the SDL_MOUSEMOTION event using xrel and yrel. Here some code fragments: SDL_MouseMotionEvent motionEvent = Event.motion; ... if(bUsingHighPrecisionMouseInput) { MessageHandler->OnRawMouseMove(motionEvent.xrel, motionEvent.yrel); } else { MessageHandler->OnMouseMove(); } As mentioned xrel and yrel are not using the XInput2 extension which causes to stop giving values when the cursor reaches the end of the window. Luckily SDL2 provides with 2.0.4 the real rel mouse movement with SDL_SetRelativeMouseMode(Enable ? SDL_TRUE : SDL_FALSE); The relative mouse movement stuff on windows/mac and linux is done in this method: void FLinuxApplication::SetHighPrecisionMouseMode( const bool Enable, const TSharedPtr< FGenericWindow >& InWindow ) { ... } In tha
Comments
Post a Comment