Why doesn't my collision detection between two Area2D objects in Godot 4 work?

AI Thread Summary
The discussion focuses on detecting collisions between a circle and a floor in a script where the circle is falling. The initial setup appears correct, but the collision detection is not functioning as expected. Key points include the importance of understanding the tutorial material rather than following it blindly and the suggestion to verify if the '_on_body_entered' event is triggering before implementing additional collision code. This indicates a need for troubleshooting to identify the underlying issue with the collision detection.
Darkmisc
Messages
222
Reaction score
31
TL;DR Summary
I've followed steps from a tutorial on how to set up collision detection between two Area2D objects. It's not working and I can't figure out why.
Hi everyone

I'd like to detect collisions between a circle and a floor.

I have set them up as follows:

1684196663869.png

1684196709419.png
1684196621540.png


1684196743781.png
The script runs fine (it's just a circle falling towards the floor), but nothing happens when the two objects collide.

Does anyone know what I've done wrong?Thanks
 
Technology news on Phys.org
Darkmisc said:
Does anyone know what I've done wrong?
Yes, (1) following a tutorial blindly without thinking and (2) giving up before you have tried to find the problem.

Before you add the 'if body.is_in_group' code you should test to see if the '_on_body_entered' event is firing.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top