Closed leruaa closed 8 years ago
Sorry to bother you again ;) but do you plan to merge this ?
Yes I do. the problem is, we changed bunch of stuff, just a week ago, regarding transforms. This is probably not affecting this, but we kinda have to re-test this again, against this latest changes, because it can break stuff.
@Sasun could you please take a look?
Yeah I saw that ;)
I just checked the issue #81 is still there with all the last changes, and that it is still resolved with my PR.
I am currently looking at the implementation. and I understand offsetX is a variable in transform component set for physics only, and it seems it should not be, because transform only should know it's entities position in it's parent. Even more then that, fixing this issue should not anyhow change the way drawable logics work. So this is an issue.
The way this properly should be fixed is - when positioning the box2d item in physics system, we should position it using not local coordinates, but global coordinates calculation (by recursively going up through parents)
Ok, well I think I will start over in a new PR.
This PR fix the issue #81.
The transforms offset computing are now moved from
Overlap2dRenderer
to aTransformSystem
system that is processed before thePhysicsSystem
andOverlap2dRenderer
.I tested the fix in runtime and in the editor.