Wires in Corona?

Hello All,

I’m wondering if there’s anyone out there who has found away to create a continuous and curve-able wire.
Imagine a fishing line that is swishing around in water and it would have a slight resistance and curve to it.

I currently have a small solution that requires linking an array of joints together and this works relatively well with a good number of small enough joints. However when it curves, it becomes apparent that the wire is just a bunch of lines stuck together.

So my question is if anyone out there has a good solution for making a curved wire?

Thanks for any help in advance! [import]uid: 159976 topic_id: 28815 reply_id: 328815[/import]

I thought about this myself at one point. I haven’t tried it, but an idea to consider is linking a bunch of physic objects together, as you did, but making them all invisible. Then, in each frame (using an enterFrame event), draw a series of bezier curves (http://developer.coronalabs.com/code/bezier-curves-corona) to connect the successive objects in the chain. The invisible physics objects provide the collision and physics behavior, while the visible bezier curves provide the continuous curved appearance.

I don’t know if this will actually yield a convincing effect, but I wanted to pass along the idea.

  • Andrew [import]uid: 109711 topic_id: 28815 reply_id: 116140[/import]

Nice, that actually looks like a good solution.

I may go with that or just go with making invisible chains and lines connecting them to give the appearance of a wire. Either way it should work out!

Thanks! [import]uid: 159976 topic_id: 28815 reply_id: 116520[/import]