Area3D not detecting anything at high-speeds

Godot Version

4.4

Question

Hello! I have an Area3D that gets launched at another Area3D, and, when they hit, something should happen. However, nothing was happening.

After looking into it, I found it was because one of the Areas was moving so fast that it just couldn’t detect the other. Is there a way to get one Area to detect the other at fast speeds without replacing it without a RigidBody3D?

Not sure what to put for reference, so if anyone needs something, I’ll be happy to pull it up.

You can cast a RayCast3D or a ShapeCast3D ahead or behind of your area to check if there is/was something.

1 Like

Thanks for the quick reply! How would you recommend I implement something like this?

You just check every frame if the raycast is hitting something and then apply your logic, the same as area would hit something.

2 Likes

Yes I had this problem, also when i used to use Unity.
Add add a raycast for main check and body for fallback.
Raycast does the trick for me

1 Like

Thanks everyone! This had me stuck for like, a week. Yea, the ray cast works fine!

1 Like

Glad you got there.
The good ol ray cast trick

Just to add the reason why this is happening and why raycasts work:

In the end if an object (any 2D or 3D) is moving too fast its conceivable that it can go right through an entire objects collision shape in one frame and doesn’t get detected.

The reason why a raycast works is because its checking across the entire line until it hits something, and that line is always there.