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

[Bug] Physics bodies inside Composite Items are not positioned relative to the composite item #81

Open
kschoos opened this issue Jan 29, 2016 · 3 comments

Comments

@kschoos
Copy link

kschoos commented Jan 29, 2016

Reproduction:
Drag an image into the scene
Make it a composite item
Enter the composite item
Give the image a polygon component and physics component
Move the object to 10, 10 inside the composite
Step out of the composite
Move the composite to 5, 5

Load the Scene in LibGdx with a Box2D debugRenderer
See that the physicsObject is at 10, 10 World coordinates although it should be at 15, 15
See that the textureComponent is at 15, 15 World coordinates where it belongs.

Changing processBody so that the physicsBody's Transform is set to the right place ( parentTransformPosition + transformPosition ) moves the body to the right place (15, 15) but moves the textureComponent to the wrong place (20, 20).

@leruaa
Copy link
Contributor

leruaa commented Feb 25, 2016

I saw that bug too.

A solution would be to move the transforms offset computing from Overlap2dRenderer to a TransformSystem system that will be processed before the PhysicsSystem and Overlap2dRenderer.

@azakhary I'm ready to implement this solution if it works for you.

@azakhary
Copy link
Contributor

@gevorg-kopalyan what do you think?

@leruaa
Copy link
Contributor

leruaa commented Mar 7, 2016

Any news on this ?

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

No branches or pull requests

3 participants