You could use Area2D as a base node.
Add a script and connect its signals _on_mouse_entered
and _on_mouse_exited
In those methods alter the state or even set_process(true)
to enable some kind of behavior.
An example:
var hover = false
func _process(delta: float) -> void:
if hover:
rotate(0.01)
func _on_Area2D_mouse_entered() -> void:
hover = true
func _on_Area2D_mouse_exited() -> void:
hover = false
If you want to manage complex animations, I think you should check Animation Tree, in that case you could define 2 base looping animations for hover/non-hover and also a couple of transition animations. In that case you will call the animation tree on the mouse enter/exit functions setting transition to main animations (letting it manage the transitions).
But first check if something like the solution above could solve your problem.