Mouse becomes less sensitive in low-res

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By stillinthe90s
:warning: Old Version Published before Godot 3 was released.

Simulating low-res first person 3D with

get_tree().set_screen_stretch(2,0,Vector2(320,200))

…makes mouse movement very un-sensitive. The camera does not follow the mouse at all if I move it too slowly. 640x400 works slightly better.

I’m trying out gokudomatic’s fps controller, which is using MOUSE_MODE_CAPTURED.
Thoughts?

My guess is that the mouse coordinates you are using are getting stretched too, because mouse position is in pixels, but your pixels are occupying a bigger area now.
It might be an issue to report because despite this stretching there should be a way to get screen-pixels coordinates of the mouse, in addition to viewport-pixels coordinates. I can’t find any way to do that at the moment :confused:

There was also an issue about getting raw mouse input, which could help in your case Raw Mouse Input · Issue #7994 · godotengine/godot · GitHub

Zylann | 2017-03-16 21:49

Maybe there is a way to use a pixelation effect filter or shader instead of stretching the viewport?

kapi | 2017-03-16 23:20

That’s a possible workaround, but using the viewport stretching is a lot easier and faster.

Zylann | 2017-03-16 23:33

It looks like the choice is between bad controls or the hassle of using shaders, then.

The “pixelize” screen space shader in the demo can be tweaked into simulating low-res, but I’m not sure how reliable the results are when run on different screens /systems.

stillinthe90s | 2017-03-17 11:39

What about the data of InputEventMouseMotion?
If relative position or speed data is more accurate at low resolution, you may be able do something.

eons | 2017-03-17 17:05

The point is, it’s not more accurate, it looses precision because anything related to mouse coordinates is expressed in integer pixels. So you can end up in a situation where you slowly move the mouse, but the FPS camera won’t move at all.
Event though speed parameters are typed “float” in the docs, they suffer from the same problem.

Zylann | 2017-03-17 19:59