Dimensions of physics body when using sprite.

Of I add sprite as physics body… what width and height does it take?

I have a sprite sheet in which all frames are 80x80
Ssome frames have visible pixes only on 40x80 rectangle in the middle part of sprite. When i make this sprite physics body it takes the dimensions of the body to be 40x80 instead of 80x80.

Any idea how to make it take actual sprite size?

Following is my descriptor file if that helps.

[lua]function getSpriteSheetData()
local d = 20
local sheet = {
frames = {
{
name = “s.png”,
spriteColorRect = { x = d, y = d, width = 2*d, height = 3*d },
textureRect = { x = 0, y = 0, width = 2*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fs.png”,
spriteColorRect = { x = d, y = d, width = 2*d, height = 3*d },
textureRect = { x = 0, y = 7*d, width = 2*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “sw.png”,
spriteColorRect = { x = 0, y = d, width = 3*d, height = 3*d },
textureRect = { x = 120, y = 4*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fsw.png”,
spriteColorRect = { x = 0, y = d, width = 3*d, height = 3*d },
textureRect = { x = 120, y = 11*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “w.png”,
spriteColorRect = { x = 0, y = d, width = 3*d, height = 3*d },
textureRect = { x = 0, y = 4*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fw.png”,
spriteColorRect = { x = 0, y = d, width = 3*d, height = 3*d },
textureRect = { x = 0, y = 11*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “nw.png”,
spriteColorRect = { x = 0, y = 0, width = 3*d, height = 4*d },
textureRect = { x = 4*d, y = 0, width = 3*d, height = 4*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fnw.png”,
spriteColorRect = { x = 0, y = 0, width = 3*d, height = 4*d },
textureRect = { x = 4*d, y = 7*d, width = 3*d, height = 4*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “n.png”,
spriteColorRect = { x = d, y = 0, width = 2*d, height = 4*d },
textureRect = { x = 2*d, y = 0, width = 2*d, height = 4*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fn.png”,
spriteColorRect = { x = d, y = 0, width = 2*d, height = 4*d },
textureRect = { x = 2*d, y = 7*d, width = 2*d, height = 4*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “ne.png”,
spriteColorRect = { x = d, y = 0, width = 3*d, height = 4*d },
textureRect = { x = 7*d, y = 0, width = 3*d, height = 4*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fne.png”,
spriteColorRect = { x = d, y = 0, width = 3*d, height = 4*d },
textureRect = { x = 7*d, y = 7*d, width = 3*d, height = 4*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “e.png”,
spriteColorRect = { x = d, y = d, width = 3*d, height = 3*d },
textureRect = { x = 3*d, y = 4*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fe.png”,
spriteColorRect = { x = d, y = d, width = 3*d, height = 3*d },
textureRect = { x = 3*d, y = 11*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “sw.png”,
spriteColorRect = { x = d, y = d, width = 3*d, height = 3*d },
textureRect = { x = 9*d, y = 4*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},
{
name = “fsw.png”,
spriteColorRect = { x = d, y = d, width = 3*d, height = 3*d },
textureRect = { x = 9*d, y = 11*d, width = 3*d, height = 3*d },
spriteSourceSize = { width = 4*d, height = 4*d },
spriteTrimmed = true,
textureRotated = false
},

}
}
return sheet
end [/lua] [import]uid: 48521 topic_id: 10814 reply_id: 310814[/import]