+1 vote

More specifically I would say that I am making a mobile fps, so I use if event is InputEventScreenDrag instead of InputEventMouseMotion to make my player look around. But as you know, the looking around should only happen if I drag on the right side of screen and not anywhere in the screen.
So how can I implement it?

Godot version 3.1
in Engine by (50 points)

1 Answer

+1 vote
Best answer

I haven't tested if this works like I believe, but from the docs it seems that you can get the start position of a screen drag from event.position, so you would just check if event.position.x > OS.window_size.x / 2 before handling anything

by (86 points)
selected by
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.