# \[Box2D\] making complex polygons

**URL:** <https://forum.kirupa.com/t/box2d-making-complex-polygons/326634>\
**Category:** flash\
**Created:** [January 1, 2012, 3:23pm UTC](https://forum.kirupa.com/t/box2d-making-complex-polygons/326634 "2012-01-01T15:23:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AfterEight](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AfterEight](https://forum.kirupa.com/u/AfterEight)\
**Post date:** [January 1, 2012, 3:23pm UTC](https://forum.kirupa.com/t/box2d-making-complex-polygons/326634/1 "2012-01-01T15:23:01Z")

</div>

Hopefully box2d questions are ok here. I posted long ago in the official box2d forums but it’s completely dead. Maybe some box2d guys here? Well here goes: So I’m trying to create a custom shape that I define with points (b2Vec2, 11 points) and then use the SetAsArray method to set it up (code below). So it creates it, but when a ball hits it, it’s not working right. It seems like hitting quicksand and then falling through (I also set up boundaries so it hits that after it goes through, if I remove it then the ball just goes off screen). Here is the swf for you guys to see exactly what is happening (debug draw is on):

> **[DropTheBall.swf](https://www.newgrounds.com/dump/item/81f3286a2e92393b919e5c90ca71cba3)**
>
> DropTheBall.swf by AfterEight

  
edit: why does the code tag completely mess up this?  
edit2: see the code in this thread: [http://www.box2d.org/forum/viewtopic.php?f=8&t=8013](http://www.box2d.org/forum/viewtopic.php?f=8&t=8013)
