Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
polygon bug? — Gideros Forum

polygon bug?

vyh77vyh77 Member
edited July 2014 in Bugs and issues
Hi,

Either there is a bug, or I still don't understand the coordinate system.

I created a triangle like this:
local triangle = b2.PolygonShape.new()
triangle:set(
		0, -20,
		-5, -10
                5, -10,
		)
which is in my opinion convex and CCW. But I got error "Polygon should be convex and should have a CCW winding order."

When creating the polygon CW, works fine without errors:
local triangle = b2.PolygonShape.new()
triangle:set(
		0, -20,
		5, -10,
		-5, -10
		)

Comments

Sign In or Register to comment.