Hi,
I have the following issue.
I am working on a project made in Godot, but depended on the time working on my private pc or company pc.
The code which I would like to use is following.
func _input(event):
if settings.pause == false:
mouse_position = event.global_position
global_x = event.global_position[0]
global_y = event.global_position[1]
This works perfectly on my private pc and on android but for whatever reasons causing an error on my company pc.
Invalid get index 'global_position' (on base: 'InputEventJoypadMotion').
There I have to use this code part (which works on all 3 devices but is more "laggy").
func _input(event):
if settings.pause == false:
mouse_position = get_viewport().get_mouse_position()
global_x = mouse_position[0]
global_y = mouse_position[1]
I feel like I forgot to enter somewhere something or enable a flag but I can't figure it out.
Thanks for your help.