Hi guy,
I am new in Corona and still learning this awesome framework. Just a simple question maybe takes you 1 min to answer. I khow how to create an object and add it to physics body like this, but if an object is not a perfect geometric shape like a circle or square or rectangle, I have an issue. It seems there is a invisble rectungle around my PNG file that does’t let the object to stay in natural physics bahavior.
For exmple, see the screenshot. Why the house stayed like this? when I drag it and move it, it seems it’s inside a square.
this is the code that creates it:
the code is in : Sample Code\Physics\DragPlatforms
local cube = display.newImage( "house\_red.png", 80, 150 ) physics.addBody( cube, { density=5.0, friction=0.3, bounce=0.4 } )
What I mean is the house should not stay like this, it should fall to the right or left ( in real life object )
Should I change anything in PNG file or in the code ?
Thank you so much