How to detect location of event in func _input(event)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AnindyaRoy

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?

:bust_in_silhouette: Reply From: therealguy

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