BayazitDecompresser exception

Topics: Developer Forum, User Forum
Jul 11, 2010 at 7:15 AM
Edited Jul 11, 2010 at 7:15 AM

I get an "ArgumentOutOfRangeException was unhandled, Parameter name: index" when I try to create a List<Vertices> in order to create a body from one of my textures.  I've got 4 textures I use for my ground.  I commented out the first, and I got an error on my second when it tried to return verts[0] and there were no verts (Index out of range).  What are the requirements of converting a Texture to a physics body in FP3?  I'm sure my textures are the problem, but what do I need to watch out for so I can fix them?

Coordinator
Jul 13, 2010 at 7:50 PM
The Bayazit algorithm is not really that robust yet. I'll try to document the common problems when I can. Until then, could you create an issue and attach a testbed test that recreates the error?
Jul 14, 2010 at 6:26 AM
Edited Jul 14, 2010 at 6:27 AM

Thanks Genbox.  I'll play with it some more and let you know.  The textures I was using are completely unoptimized and that was my first attempt at creating fixtures/bodies out of one.  If I continue having problems once I try and simplify it, I will let you know.  The problem I have above doesn't happen in the testbed, so I'm sure my large textures are part of the problem.  

Going forward, however, I am going to need a quick way to create parts of my level, which I can probably do easily enough with a proper level editor.  I can then just use simple geometry (squares, rectangles, circles, triangles, etc.) to staticly lay behind my textures and still have the same effect.  I need an editor no matter what, so I might as well focus my efforts on that :)  That being said, it would be really cool to just draw my level, and know that I can generate the physics bodies on the fly, but that will probably end up opening a can of worms vs the simple geometry approach.

Cheers.