godotengine / godotengine/godot
Collisions not working in @tool scripts
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in v4.3.rc2.official.3978628c6 and 4.2.2
### System information
Godot v4.3.rc2 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2070 SUPER (NVIDIA; 31.0.15.5152) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)
### Issue description
I have been unable to find any info in the docs that collisions are not intended to work with `@tool` scripts, so I assume they should. Seems like a pretty fundamental thing, so perhaps I am doing something wrong or missing something obvious.
In the example, at runtime, the collisions work as intended, but if you interactively drag the collider around in the editor with a `@tool` script, the collision signals don't trigger.

Here is the script code for the signals...

The attached example has two colliders, one is a Static body (square) and another Area2D (capsule). The Area2D circle overlaps them both and the collision signals fire correctly at runtime (see screenshot for output). But it does not work if I drag the circle over them in the editor. Shouldn't this work with `@tool` scripts?
### Steps to reproduce
- Run the example MRP project and you'll see in the output window that the collision signals trigger correctly
- However, if you pick up the Area2D_CIRCLE and move it in the editor, the signals do no fire. I believe the should with a `@tool` script. If they should not, this should be stated somewhere in the docs, but this seems very fundamental.
### Minimal reproduction project (MRP)
[Area2D_Tool_bug.zip](https://github.com/user-attachments/files/16471090/Area2D_Tool_bug.zip)
Contributor guide
Assessment
This issue has not been assessed yet.