Area3D body_entered not reliably detecting Rigidbody3D

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By PurpleLeprecaun

I have a projectile that consists of:

The Area’s collisionshape is slightly larger than the rigidbody’s collisionshape, when hitting another rigid body the projectile will sometimes BUT NOT ALWAYS push the other rigid body without triggering the _on_Area_body_entered function. The script is attached to the rigid body. The projectile will interact flawlessly with the static body I’m using for a floor and will sometimes interact correctly with the rigid body targets but more often than not it will just push the rigid body without ever triggering the _on_Area_body_entered function.

func _ready():
connect("body_entered", $Area, "_on_Area_body_entered")

func _on_Area_body_entered(body):

I originally connected the signal through the editor but connecting it through code had no effect. Continous Cd has no effect as well. My only thought is that sometimes the area enters the target body faster than it can detect it and I’m only checking for hit on enter. I’m losing my mind trying to find a solution so any help is appreciated.

use Raycast if the bullet is too fast

ramazan | 2022-07-18 16:43

I should have specified, that’s on me, that the projectile is a rocket, i want it to have travel time

PurpleLeprecaun | 2022-07-18 17:23

I made the area larger and it fixed the issues

PurpleLeprecaun | 2022-07-19 23:09

:bust_in_silhouette: Reply From: Toupoc3

Is the projectile moving too fast?

If I decrease the projectile’s speed the detection works a little more reliably but
a) The projectile has to move very slowly
b) The detection still doesn’t consistently work

The rigid body in the projectile has no problem interacting with the rigid body of the target, the area around the projectile is having issues.

PurpleLeprecaun | 2022-07-18 17:54