Problem with PHYSICS EDITOR

Hi. i have trouble

When I import image to physics editor after succesfully do point to ITEM but i my ITEM in MAIN.LUA is still same with square collision.

When i publish ITEM from physics editor i have this code

– This file is for use with Corona® SDK

– This file is automatically generated with PhysicsEdtior (http://physicseditor.de). Do not edit

– Usage example:

– local scaleFactor = 1.0

– local physicsData = (require “shapedefs”).physicsData(scaleFactor)

– local shape = display.newImage(“objectname.png”)

– physics.addBody( shape, physicsData:get(“objectname”) )

– copy needed functions to local scope

local unpack = unpack

local pairs = pairs

local ipairs = ipairs

local M = {}

function M.physicsData(scale)

local physics = { data =

[“drewno01”] = {

                    

                    

                    

                    

                    {

                    pe_fixture_id = “DREWIENKO”, density = 2, friction = 0.5, bounce = 0.3, 

                    filter = { categoryBits = 1, maskBits = 65535, groupIndex = 0 },

                    shape = {   5.5, 29.5  ,  -25.5, 15.5  ,  -49.5, 0.5  ,  -15.5, -32.5  ,  11.5, -38.5  ,  42.5, -27.5  ,  16.5, 19.5  ,  10.5, 28.5  }

                    }

                     ,

                    {

                    pe_fixture_id = “DREWIENKO”, density = 2, friction = 0.5, bounce = 0.3, 

                    filter = { categoryBits = 1, maskBits = 65535, groupIndex = 0 },

                    shape = {   42.5, -27.5  ,  11.5, -38.5  ,  30.5, -37.5  ,  38.5, -33.5  }

                    }

                     ,

                    {

                    pe_fixture_id = “DREWIENKO”, density = 2, friction = 0.5, bounce = 0.3, 

                    filter = { categoryBits = 1, maskBits = 65535, groupIndex = 0 },

                    shape = {   11.5, -38.5  ,  -15.5, -32.5  ,  -0.5, -38.5  }

                    }

                     ,

                    {

                    pe_fixture_id = “DREWIENKO”, density = 2, friction = 0.5, bounce = 0.3, 

                    filter = { categoryBits = 1, maskBits = 65535, groupIndex = 0 },

                    shape = {   -49.5, 0.5  ,  -47.5, -5.5  ,  -36.5, -17.5  ,  -15.5, -32.5  }

                    }

                    

                    

                    

}

} }

        – apply scale factor

        local s = scale or 1.0

        for bi,body in pairs(physics.data) do

                for fi,fixture in ipairs(body) do

                    if(fixture.shape) then

                        for ci,coordinate in ipairs(fixture.shape) do

                            fixture.shape[ci] = s * coordinate

                        end

                    else

                        fixture.radius = s * fixture.radius

                    end

                end

        end

function physics:get(name)

return unpack(self.data[name])

end

function physics:getFixtureId(name, index)

                return self.data[name][index].pe_fixture_id

end

return physics;

end

return M

I really dont know where this code paste in main.lua to works fine. 

No one know how to import “good collision image” to outlaw ? or how to make “good collision image” in other programs

THANKS A LOT !

i understand now how to import from this tutorial 

https://www.codeandweb.com/blog/2012/05/24/getting-started-with-coronasdk-and-physicseditor-tutorial

but i have problem

in 160 lines i have error so i delete “,” and now i have other error in 202line

shapedefs.lua:bad argument #1 to ‘unpack’ (table expected, got nil)

stack traceback:

[C]: in function ‘unpack’

shapedefs.lua:202: in function ‘get’

main.lua:28: in main chunk

Please help me. I cant give up. I must do my game.

No one know how to import “good collision image” to outlaw ? or how to make “good collision image” in other programs

THANKS A LOT !

i understand now how to import from this tutorial 

https://www.codeandweb.com/blog/2012/05/24/getting-started-with-coronasdk-and-physicseditor-tutorial

but i have problem

in 160 lines i have error so i delete “,” and now i have other error in 202line

shapedefs.lua:bad argument #1 to ‘unpack’ (table expected, got nil)

stack traceback:

[C]: in function ‘unpack’

shapedefs.lua:202: in function ‘get’

main.lua:28: in main chunk

Please help me. I cant give up. I must do my game.

@damian.p.kowalczyk

Did you ever find a fix to this error?  I also have the error!

@damian.p.kowalczyk

Did you ever find a fix to this error?  I also have the error!