One big texture respresenting a couple of small bodies

Dec 13, 2011 at 12:22 PM


I created a custom terrain using MarchingSquares-algorithm of the desructable terrain demo. Creating the terrain containing lots of bodies works well but I have trouble drawing the terrains bodies with nice textures.

First I stored a texture for every single body created by the AssetCreator-class in the bodies UserData-Field. But this is not very beatiful at all. There are edges between the single textures and the textures does not seem to be correct for very small bodies.

In order so solve my problem I used the YuPengClipper to compine my polygons.

I wonder if there is a possiblity to create a texture from the list of vertices returned by the YuPengClipper without creating a body before?