I can't make this work! :(
So my goal is to simply detect the other colliders that gets in my trigger.
I modeled a 3D Cone that will act like a "spray" weapon to anyone that stands in it.

The code is located in the root obj of the cone:

So I tried the code as an Area object (PS: the "#" are there to avoid errors in that case):
extends Area
func _ready():
#set_contact_monitor(true)
#set_max_contacts_reported(5)
connect("body_enter", self, "_on_body_enter")
pass
func _on_body_enter(body):
print (body.get_name())
pass
and as a RigidBody instance (Yes, I changed the root obj type):
extends RigidBody
func _ready():
set_contact_monitor(true)
set_max_contacts_reported(5)
connect("body_enter", self, "_on_body_enter")
pass
func _on_body_enter(body):
print (body.get_name())
pass
In either ways, nothing is printed in the output!!
Are there some important things I am missing?:
- Do other colliding objects needs a trigger collision shape?
- Does bodyenter works in process or fixedprocess?
- Does it work at all on Area instances or only works as RigidBody?
Help me plz, Math