Physics are sticking???

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} )

** and here is how I made the ball

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 )
Thanks [import]uid: 42126 topic_id: 9217 reply_id: 309217[/import]

I think you defined your shape points in a counter-clockwise direction, which is not correct. Try your shape using this:

triangleShape = { 30,-30, 30,30, -30,30 } [import]uid: 23636 topic_id: 9217 reply_id: 33626[/import]

That worked perfectly. Thank you

Now would you know how to ignore a touch event?
For example: I have my background as an tap event listener and i also have objects on the screen that can be removed when they are touched.

My question is this: Can you ignore the background’s event listener when you tap one of the removable objects? [import]uid: 42126 topic_id: 9217 reply_id: 33628[/import]

If your object receives the tap event first, then when you are finished handling it, return true. This means the event has been handled, and stops the event from percolating up to the next parent, which would be your background.
[import]uid: 23636 topic_id: 9217 reply_id: 33643[/import]

Once again thank you. That worked.
One more question haha…

When my ball object sits on top of the object I am wanting to remove, if I do not remove the object quickly when I enter the scene, my ball shoots down quickly.

Any thoughts for a solution?

Thanks again [import]uid: 42126 topic_id: 9217 reply_id: 33656[/import]

Now you’re getting into the logic of your program design. This is the time to dive into the sample programs and explore how they do the things that interest you. [import]uid: 23636 topic_id: 9217 reply_id: 33744[/import]