#problem with detecting

1 messages · Page 1 of 1 (latest)

clever sleet
#

I have a problem that button doesnt detect trashbin(staticbody2d)
but it detects player
I have no idea what could be a problem
Could someone help me?

ornate vault
#

what node is button

clever sleet
clever sleet
ornate vault
#

i have recreated it and it works for me

#
extends Area2D


func _on_body_entered(body: Node2D) -> void:
    print("entered")
clever sleet
#

I dont know then

#

I probably forgot to do something obvious

ornate vault
#

are you disabling collision somewhere

clever sleet
#

no

ornate vault
#

check collision layer in the main scene maybe you have it set differently in the trashcan scene and in the main game scene

#

main scene overwrites the collision layer settings

clever sleet
#

but they both are seperated scenes

ornate vault
#

but you are adding trashcan scene in to main no ?

clever sleet
#

yes

ornate vault
#

then check collisions on the packed scene

clever sleet
#

they look good

ornate vault
#

thats weird, its working correctly on a fresh scene so there must be something interfering somewhere

clever sleet
#

Okay
So i kind of fixed it(I avoided problem and did it different way)
and I just putted to trash bin area2d and I did on_area_entered

Anyway
Thank you so much

ornate vault
#

didnt do anything but hopefully the issue wont come back