extends Area2D
var clckd=false
var pos_chd=false
func _ready():
set_physics_process(false)
pass
func _process(delta):
if clckd:
clckd = false
pos_chd = true
print('\nms click')
func _physics_process(delta):
print(delta)
if pos_chd:
pos_chd=false
print('\n pos changed')
for a in get_overlapping_bodies() :
print ('body: ', a.get_parent().name,'/', a.name)
for a in get_overlapping_areas():
print ('area: ', a.get_parent().name,'/', a.name)
set_physics_process(false)
pass
func _input(e):
if (e is InputEventMouseButton
and e.button_index == BUTTON_LEFT and not e.pressed) :
position = get_global_mouse_position()
clckd = true
set_physics_process(true)
RE: godot collision detection mouse position
You are viewing a single comment's thread from:
godot collision detection mouse position