Can somebody (Ansca?) please confirm that complex physics shapes must be defined in clockwise order on their vertex points? There seems to be confusion on this issue in the documentation and elsewhere in the forums.
@Tom (Ansca) wrote:
Yes, it can be confusing because Corona defines the home screen position (0,0) at the upper top left so the shapes need to be defined in the Clockwise direction. I forgot that the Box2D documentation assumes a different coordinate system so it requires the shape table to be defined in counter-clockwise order.
So which is it? Corona always wants clockwise based on its “upper-left” coordinate system? If so, does it matter where on the “clock” I begin the points? Assume a pentagon shape… do I need to start at “12 o’clock” and work clockwise around all 5 points, or can I start at “4 o’clock” and move back around to that starting point? Does Corona care which point I begin with or is the key factor the directional order of points?
I’m not using Physics Editor, but rather the awesome (and free) Adobe Fireworks plugin by Ludicrous Software (http://www.ludicroussoftware.com/corona-physics-shape-panel-for-fireworks/index.html). I’m using Fireworks to design all of my game art, so it makes sense to just draw my paths in Fireworks and use this plugin to get the points. This utility plots the points in clockwise order, so I assume this is correct in Corona’s terms (more “votes” for clockwise versus the opposite).
Anyway, can somebody please confirm that clockwise is correct based on their actual app testing? I will be designing a considerable amount of complex shapes for my game, so I want to confirm this method 100% before I begin.
Sincerely,
Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 22357 reply_id: 322357[/import]
[import]uid: 52491 topic_id: 22357 reply_id: 89241[/import]