I’ve been done plenty of testing and research with Level Director and bezier curves.
I have some bezier curves (nothing extreme, just some nice hills up and down).
I have a rectangle that slides up and down the hills.
The problem is that occasionally the corner of the rectangle gets stuck and flips the rectangle (not desired effect).
Digging into the function in the Level Editor helper file I can see that the curve is split into segments and little overlapping long-triangles are created (sort of like a sawtooth). This is still causing flipping at certain points and it’s also horrible because the object can’t go backwards over the curve.
Doing some more research I’ve learned that this is a common issue/question with Box2d and with ghost vertices.
http://www.iforce2d.net/b2dtut/ghost-vertices
The thing that’s cool is that the chain shape in Box2d removes this issue: http://www.box2d.org/manual.html
In section 4.6 it says this: “Chain shapes automatically eliminate ghost collisions and provide two sided collision.”
Is this the same as the
Listed here in Corona docs: http://docs.coronalabs.com/guide/physics/physicsBodies/index.html
Is there anyway that Level Director’s algorithm could be upgraded to use this for bezier curved physics? I think it would improve the overall result of physics applied to bezier curves.