TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
Polygon Regions
Pages:
1
Polygon Regions
blackbishop89
May 09, 2011, 01:58:22 pm
First: What's the code for create a polygon region? I can't find it.
Second: Let's split this into parts.
1. Code to start the polygon.
2. Code to add a point to the polygon.
3. Code to close the polygon.
4: Code to move a specific point in the polygon.
Greg
Posts: 1259
May 09, 2011, 05:37:27 pm
It's not really that easy right now. You'd have to call this
Code:
[Select]
private function createRegion(x:Number, y:Number, shape:b2Shape, offset:Boolean=false):Region
But you'd need to create a Box2d polygon shape first and pass that in. There's no formal methods for creating or adding points.
greg@stencyl.com
Pages:
1