Hi guys. This is only my 3rd day of using Corona and love it, however I’ve run into an issue.
I’m trying to create a complex physics object, however, for some reason whenever the player walks over it, about half way through they fall through…
Now I’m thinking its due to how I entered the coordinates (clockwise notation), but I’ve tried changing them around and doing them backwards but no luck. Its just a rectangle, so, it shouldn’t have any concave issues. Any tips?
[code]
–add the ground
local ground1 = display.newImage(“ground1.png”)
game:insert(ground1)
local physics_body = {}
physics_body[“ground1”] = {
{
density = 5.0, friction = 0.5, bounce = 0.3,
shape = {400,200, 400,220, 0,220, 0,200}
}
}
physics.addBody(game, “static”, unpack(physics_body[“ground1”]))
[/code] [import]uid: 81846 topic_id: 14421 reply_id: 314421[/import]