Triangle physics not working?

I have a ball that I want to roll down the slope of a triangle, but it just gets stuck wherever it touches the triangle. Can anyone help fix this so that the ball simply rolls down? Here’s how i made my triangle:

local triangle = display.newImage(“obstacles/triangle.png”)
triangleShape = { 30,-30, -30,30, 30,30 }
physics.addBody(triangle, “static”, { density = 0, friction = 0, bounce = 0.1, shape = triangleShape} )

Thanks [import]uid: 42126 topic_id: 9186 reply_id: 309186[/import]

Hi,

How have you created the ball?? [import]uid: 54628 topic_id: 9186 reply_id: 33563[/import]

local ball = display.newImage(“balls/ball.png”)
physics.addBody( ball, “dynamic”, { density = 0.9, friction = 0, bounce = 0.1, radius = 14 } )

** I have also tried leaving off the dynamic body type and that didn’t do anything.
And none of my bodies are sleeping because I did this:
physics.start( true ) [import]uid: 42126 topic_id: 9186 reply_id: 33566[/import]

If it helps, have you tried to make it a false triangle, with a fourth point, so you have a triangle like 29,-30,-30,30,30,30,30,-30

that night just work for you, haven’t tried it, so this is just a suggestion.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 9186 reply_id: 33683[/import]