Prevent mapping areas with invalid IDs for Area2D/3D - #79460
Conversation
Area2D/3D
306d46c to
0830c30
Compare
0830c30 to
df6e1f8
Compare
df6e1f8 to
d30d8d1
Compare
There was a problem hiding this comment.
[b]Note:[/b] [Area2D]s and [PhysicalBody2D]s created..
Also, is this correct? This makes it sound like creating them from PhysicsServer would result in instability. Is this only at the very beginning of simulation or?
There was a problem hiding this comment.
This is correct, they are not associated with a node so they work differently,
d30d8d1 to
f861bdb
Compare
|
Maybe add a note to the physics servers docs as well? |
|
This is specifically about behaviour of The server side description is lacking but IMO outside the scope of this fix |
|
Makes sense, thanks for explaining |
YuriSizov
left a comment
There was a problem hiding this comment.
I think you can squash commits, emitting here seems to follow the established logic. That logic is kind of weird and indeed can lead to the signal being emitted with some garbage object reference, but I don't think your changes are going to make it worse in any way.
061ca8b to
1e11932
Compare
This occurs when areas are created directly from the servers, and no instance is linked.
1e11932 to
0081a50
Compare
|
Thanks! |
|
Thank you! |
Prevent mapping areas with invalid IDs for `Area2D/3D`
Prevent mapping areas with invalid IDs for `Area2D/3D`
The inout code of area assumes a valid
ObjectIDis attached to all bodies and areas, leading to it mapping the invalid one to one entry, which doesn't make sense and creates strange behaviourAdded a separate commit for emitting the signals, uncertain if they should or should not be emitted in these cases, there's also an inconsistency between bodies between 2D and 3D which I matched there, can omit the signals if desired
Will also look into the same for bodies, and 3.x