PonyTiled Plugin - map is moving but collision 2dbox box is not

Im using ponytiled plugin to load tilled map file 

when i move map in my gameloop my collision 2d box remain the same and does not move along with map display object when  i move my hero with tap on map

Here is my project link https://github.com/shadmanssk/zombieland.v2

I think you should create character in your game similar to hero in Sticker Knight Platformer. Basically you should do

  • Add character to map

  • Create extensions based on file Sticker-Knight-Platformer/scene/game/lib/hero.lua

  • Add extenions to character like in SKP

    map.extensions = “scene.game.lib.” – line 51 from Sticker-Knight-Platformer/scene/game.lua map:extend( “hero” )

Yeah i know that StickerKnight platformer but im trying to learn more about corona and i dont want to just plugin something and do my work its just that i wana know why my project is not working

Maybe this  note from documentation will be helpful 

When working with Corona display groups and Box2D, it’s important to remember that Box2D expects all physics objects to share a global coordinate system. Both grouped and ungrouped display objects will work well since they will share the internal coordinates of that group. However, unexpected results will occur if physical objects are added to different display groups and those groups are moved, scaled, or rotated independently of each other. As a general rule, do not alter the position, scale, or rotation of display groups that contain physics objects.

Then why sticker knight platformer work well and does not show the same defect even thought they also change map x and y co ordinate

I don’t have time to analyze code of SKP but I think it is because all elements character interact belongs to the same group.  

I think you should create character in your game similar to hero in Sticker Knight Platformer. Basically you should do

  • Add character to map

  • Create extensions based on file Sticker-Knight-Platformer/scene/game/lib/hero.lua

  • Add extenions to character like in SKP

    map.extensions = “scene.game.lib.” – line 51 from Sticker-Knight-Platformer/scene/game.lua map:extend( “hero” )

Yeah i know that StickerKnight platformer but im trying to learn more about corona and i dont want to just plugin something and do my work its just that i wana know why my project is not working

Maybe this  note from documentation will be helpful 

When working with Corona display groups and Box2D, it’s important to remember that Box2D expects all physics objects to share a global coordinate system. Both grouped and ungrouped display objects will work well since they will share the internal coordinates of that group. However, unexpected results will occur if physical objects are added to different display groups and those groups are moved, scaled, or rotated independently of each other. As a general rule, do not alter the position, scale, or rotation of display groups that contain physics objects.

Then why sticker knight platformer work well and does not show the same defect even thought they also change map x and y co ordinate

I don’t have time to analyze code of SKP but I think it is because all elements character interact belongs to the same group.