Physics shapes - more than 8 points?

Hi

Does anyone know if there’s a way to add more points to a physics shape.
At present it allows only 8 points - lines allow for more points to be appended (“append”) - so I’m wondering if this can be done with shapes too, or if it’s a fixed limit.

cheers [import]uid: 10814 topic_id: 9943 reply_id: 309943[/import]

physics editor can do complex shapes, made of multiple triangles. [import]uid: 44010 topic_id: 9943 reply_id: 36280[/import]

Hi

Thanks for your reply. I also just found this on the site under Physics Bodies, which allows for multiple shapes to be attached to a single shape - which will get around any 8 point limit :


local car = display.newImage(“big_red_car.png”)
roofShape = { -20,-10, 20,-10, 20,10, -20,10 }
hoodShape = { 0,-35, 37,30, -37,30 }
trunkShape = { 0,-37, 37,-10, 23,34, -23,34, -37,-10 }

physics.addBody( car, “dynamic”,
{ density=3.0, friction=0.5, bounce=0.2, shape=roofShape },
{ density=6.0, friction=0.6, bounce=0.4, shape=hoodShape },
{ density=4.0, friction=0.5, bounce=0.4, shape=trunkShape }
)

Thanks again… [import]uid: 10814 topic_id: 9943 reply_id: 36284[/import]

I’d recommend using the Physics Editor - fantastic product and the support is amazing!

It will create the physical body for you making it very, very easy to use. [import]uid: 40538 topic_id: 9943 reply_id: 36508[/import]

What is the physics editor? [import]uid: 31262 topic_id: 9943 reply_id: 36511[/import]

Thanks for the heads up, I’ll look into that - anything that speeds up adding shapes to complex bodies will help a lot… [import]uid: 10814 topic_id: 9943 reply_id: 36548[/import]

Physics editor is fantastic! It automatically traces your shape and produces a table with all the vertices (and the physic properties too). I’m hooked! [import]uid: 40033 topic_id: 9943 reply_id: 36551[/import]