-
Is there a way to query for an LDtk entity's world translation? IE, not GlobalTransform, but something like a GridVaniaTransform? I'm using the Added filter pattern to add physics components to newly-spawned LDtk entities. I just started adding levels past the first, with a GridVania layout. When querying for transforms of added tiles, I'm getting their in-level transform, so all components added in a system using the Added filter spawn in the 'right' place in the first level, and then the surrounding levels have sprites, but no late-added components. This is with load_level_neighbors: true; if that's false, then only the first level's additional components get added, but the surrounding levels never have their additional components added. I assume I'm doing something wrong, but I don't know what the right way to go about this is. Should I be doing my own Translation offsets by multiples of the worldX and worldY of the appropriate level? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hmm I'm not completely sure I understand the problem.
So the components intended for entites that aren't in the first level are still appearing in the first level? I have a couple guesses for what the problem could be..
I hope this helps, let me know if I misunderstood the issue or misdiagnosed it. |
Beta Was this translation helpful? Give feedback.
-
It's almost certainly a variation on 1. I'm doing custom physics as a learning exercise and may be doing other things wrong as well. Thanks for pointing it out! |
Beta Was this translation helpful? Give feedback.
Hmm I'm not completely sure I understand the problem.
So the components intended for entites that aren't in the first level are still appearing in the first level? I have a couple guesses for what the problem could be..
Transform
and notGlobalTransform
. We used to have this problem with rapier but we don't anymore.