When putting a group with an object and physics body to dusk layer = problem!

I am creating a group containing objects with physics bodies. Then I add this group to a dusk layer.

When I now look at my game screen the objects are off to the physics bodies.

When I’m not putting the group into the layer everything works fine.

My layer setup was made using the Tiled map editor and I’m using xParallax=1,yParallax=0 for this layer.

Any idea what is causing this and how to fix it?

Also moving the layer will only move the object (image) but not the physics body.

I’m also using the map.setCameraFocus(gfx.camfocusobj) to a helper object.

This is actually a limitation of Corona itself and not Dusk. Physics objects in groups keep world coordinates instead of being local to the position of the group. To fix this, you’ll need to either insert each object separately or use a multi-element physics body instead.

  • Caleb

This is actually a limitation of Corona itself and not Dusk. Physics objects in groups keep world coordinates instead of being local to the position of the group. To fix this, you’ll need to either insert each object separately or use a multi-element physics body instead.

  • Caleb