Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | doinsdf |
I have a character in my game that I can drag around. I do this using this simple snippet of code:
func _process(delta):
if $TouchScreenButton.is_pressed():
position = get_global_mouse_position()
(the button is on top of the object relative to the camera)
However, this causes the KinematicBody2D to override most of its collisions, especially the fast ones, and simply glitch into everything because that’s where the mouse is.
Does anyone know how I could fix this?
Thanks