How to make physics joints visible?

Hi,

Just started using the physics engine within Corona.

I have one question which I can’t find the answer to . . .

How do you show physics joints?

For example: If I have a pulley mechanism in a game, but want the virtual rope to be seen as part of the contraption on game play.

If there is a way . . . can you customise the line type, i.e. thick line or thin line with different colours?

Or is there a workaround to this?

I’d appreciate any help here from more experienced Corona users. [import]uid: 12941 topic_id: 12750 reply_id: 312750[/import]

The only way to view the physical properties of objects in Corona is to set the draw mode to either “hybrid” or “debug”.

Although I’m not quite sure it will achieve the results you’re looking for, give it a try anyways!

Here is the code for this:

[lua]-- Outlines only
physics.setDrawMode( “debug” )

– Overlays outlines on normal Corona objects
physics.setDrawMode( “hybrid” ) [/lua]

Andreas Ricci
NuPlay Entertainment
Founder & Lead Developer [import]uid: 7366 topic_id: 12750 reply_id: 46756[/import]

Thanks Andreas,

Will try this. [import]uid: 12941 topic_id: 12750 reply_id: 47633[/import]

@Kevin did you find a way to make joints visible, thick and colored?
I know it can be done, cause i’ve seen it in a game…i dunno if i’m allowed to say the name of that game here, since i dunno if it’s made with Corona or something else.
[import]uid: 67616 topic_id: 12750 reply_id: 80842[/import]