Hello,
Good day.
I have a small problem for which I can't find a solution.
In the main scene I instantiate a sheep - don't ask, long story - of the following structure:
Sheep.tscn: Area2D with script, and as Childs of Area2D Sprite and CollisionShape2D.
I use RayCast2D and get the collider and the object found is the Schaf.
I now want to access the script, which I cannot do because the collider is of type Area2D, so Godot tells me.
I tried collider.get_script() without success, as well as get_child().
Can you tell me how to get access to the script, i.e. its variables?
Thank you very much.