Error : Signal 'body_entered' is already connected

Hi !
I have a vehiclebody3D with a simple bit of code :
connect("body_entered", blabla)

With blabla being a function.
It works, but I run the game I have this error message on a loop:

Signal 'body_entered' is already connected to given callable 'VehicleBody3D(voiture.gd)::VehicleBody3D_body_entered' in that object

So from what I understand it’s because there is some kind of redundancy, but I don’t understand what would be the proper way to do it.

You can use is_connected function to check before if the node is already connected:

if not is_connected("body_entered", blabla):
	connect("body_entered", blabla)

But that’s strange, you’re trying to connect that inside which function? Looks like you’re using a function that’s called continuously like _process or _physics_process, things like that should be called inside functions like _ready

1 Like

Aaaaaah ok !

Both your replies are correct, I was totally using it inside my _physics_process, I thought it was a process you had to keep running !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.