Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Area2D does not detect the other body. #76227

Open
Torguen opened this issue Apr 18, 2023 · 6 comments
Open

Area2D does not detect the other body. #76227

Torguen opened this issue Apr 18, 2023 · 6 comments

Comments

@Torguen
Copy link

Torguen commented Apr 18, 2023

Godot version

v3.6.beta1.official [632a544]

System information

w10 64

Issue description

Problem:
The area2D of the "Player" node does not detect the body of the enemy.

To fix it make the collisionshape assigned to the area2D even bigger (currently it is 17x17) but this is not fixed, I mean you will have to make the area bigger even if the movement speeds of the nodes change.

I mean, the size of the area will be tied to the movement speeds of the nodes somehow.

So how is this understood? What size should I put in the area if it can become too big? I cannot be assigning different sizes to the area2D depending on the speed of the nodes.

Steps to reproduce

Just play the project and you'll see that when the "Enemy" node reaches the "Player" node then you don't get the body name written to the output.

Minimal reproduction project

testCuerposKinematic.zip

@KoBeWi
Copy link
Member

KoBeWi commented Apr 18, 2023

Here's a close-up of what happens:

godot.windows.editor.dev.x86_64_L8yZzOpcZh.mp4

The left sprite is moving faster, so once it collides with the right one, they stick together from now on. But for whatever reason get_overlapping_bodies() in the area is empty. Changing to lower time_scale fixes the issue, so it has something to do with area not detecting the body in time.

@Torguen
Copy link
Author

Torguen commented Apr 19, 2023

Changing time_scale in my project is not a solution, I have to use a time_scale = 0.4 for detection to occur.
I hope someone please fix this soon...

@AThousandShips
Copy link
Member

Fixes happen based on availability of contributors and detection of the cause

@Torguen
Copy link
Author

Torguen commented Apr 19, 2023

I am aware of that, which is why I say that I "hope".

@AttackButton
Copy link
Contributor

I think it is related with: #43743

@Torguen
Copy link
Author

Torguen commented Sep 23, 2024

I think it is related with: #43743

I'm not sure if they are related.
In the other project:
#43743
it is not detected perhaps because of the high speed.

In this one the speed is low, it even collides with the other body and the area is being invaded in each frame but still, the detection is not registered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants