# How can I represent collision for an object needing more than PolygonShape's maximum of 8 vertices?

This is a part of map (it is a cave) of my LibGDX game (using Box2D):

I would implement a PolygonShape as the black part of the map to prevent the whatever moves (for example a ball) inside the cave from leaving it.

This is an example of my PolygonShape like I would draw it (with 100 vertices):

The problem is that Box2D doesn't allow me create it with not more than 8 vertices...

How can I fix this thing?

Sorry, my English isn't very good. :)

Polygon shapes are normally limited by the internal b2_maxPolygonVertices setting (in the C++ library code), which as of Box2D 2.3.2 is set to 8.