Bug #917

Ryzom Client - X11 Free Look and Cam Look support (Patch included)

Added by rti over 8 years ago. Updated about 8 years ago.

Status:Closed Start date:05/19/2010
Priority:Normal Due date:
Assignee:vl % Done:

100%

Category:Client: General
Target version:Version 0.8.0

Description

Hi.

This is a patch to enable Free Look and Cam Look on X11.

The problem was, that on Windows the mouse is switching in some Direct Input Game Device mode when enabling Free Look to not have to handle window borders. It just receives "raw" mouse events. The unix event emitter does not create such events, it only creates CEventMouseMove.

Snowballs handles this by resetting the mouse position to 0.5, 0.5 after every update. This way it gets just the mouse move relative to the middle of the window and never hits window / desktop borders.

I implemented it in a similar way in the Ryzom client. The "Fake Raw Mode" is enabled on X11 just like the Direct Input Raw Mode on Windows.

It works with and without Hardware Mouse, inverted or not.
The slider in "Game Configuration - Mouse - Free Look - Head Speed" is working. The Head Acceleration not.

I added a hard-coded value in user_controls.cpp line 475. This is the multiplier to get the mouse speed at a reasonable level. The mouse speed value should be retrieved from X11 / the desktop environment in the future. I added a "TODO". Would be nice to have some kind of X11 Input Driver implementing an interface here.

ryzom_client_x11_free_look_cam_look.patch (4.5 kB) Magnifier rti, 05/19/2010 01:22 am

History

#1 Updated by kervala over 8 years ago

Thanks a lot for the patch :)

#2 Updated by vl over 8 years ago

  • Assignee set to vl

#3 Updated by vl over 8 years ago

  • Status changed from New to Assigned

#4 Updated by vl over 8 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100

Applied in changeset r190.

#5 Updated by vl about 8 years ago

  • Status changed from Resolved to Closed

#6 Updated by kervala about 8 years ago

  • Target version set to Version 0.8.0

Also available in: Atom PDF