Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
b2.PolygonShape — Gideros Forum

b2.PolygonShape

paul_k_clarkpaul_k_clark Member
edited July 2012 in General questions
Hi I want to dynamically use b2.PolygonShape passing in a list of values. The API has a set function that is a list of coordinates. This is fine for static entry of coordinates but how do pass an array of coordinates. I want to be able to do something like:

local coords = {10,0, 0,10, 100,110, 110,120, 120,110, 10,10, 0,10}
local shape = b2.PolygonShape.new()
shape:set(coords)

Comments

Sign In or Register to comment.