0 votes

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 MOUSEMODECAPTURED.
Thoughts?

in Engine by (46 points)

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 :/

There was also an issue about getting raw mouse input, which could help in your case https://github.com/godotengine/godot/issues/7994

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

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

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.

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

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.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.