Make images ignore transparent bits in png files?

How do I make so that a jpg with physics ignore the transparent bits of the groundimage which is static?

You need to use the shape property when creating your physics body:

http://developer.anscamobile.com/content/game-edition-physics-bodies#Polygon_bodies

That way you can define the shape of the physics body to be something other than the bounds of the image.

Doesn't it exist a command for just the object to ignore the transparent parts?

Nope, not at this time, anyway. It may be possible to add in something like that (I think it exists in the AS3 implementation of Box2d), but I don't know if it's on the roadmap for Corona.

views:1642 update:2011/10/6 9:28:12
corona forums © 2003-2011