Returns a Rect2 representing the Sprite's boundary in local coordinates. Can be used to detect if the Sprite was clicked. Example:
func _input(event): if event is InputEventMouseButton and event.pressed and event.button_index == BUTTON_LEFT: if get_rect().has_point(to_local(event.position)): print("A click!")
See Implementation
Returns a Rect2 representing the Sprite's boundary in local coordinates. Can be used to detect if the Sprite was clicked. Example: