I am just writing my own version of the Render.bmx program that is used in all the Test modules. Mine is not done using DebugDraw though - it is in the main body of the program after the DoStep part. I use Body.GetWorldPoint(ObjectVertex) for everypoint on a body - I store the Vertices for each shape in Userdata. The main reason I am doing this is because I want my objects to be different colours that I choose. e.g. my bullets as yellow and my spaceships as blue and red respectively.
Its working ok but I am confused in DrawSolidPolygon it does
SetAlpha 0.5
SetColor (color.red/2,color.green/2,color.blue/2)
.....
DrawPoly(poly)
If I do this exact same code in my drawing-routine nothing is drawn. I have to set the alpha to 1.0 (or higher than 0.5) for it to draw anything.
Its a minor point really, but I am not sure why the debugdraw routine can draw objects using this code when my routine can't. I think I must be missing something obvious, but i am not sure what.
Can someone enlighten me? - Thank you (I don't really understand a lot about alpha anyway - except it is like transparency)
Its working ok but I am confused in DrawSolidPolygon it does
SetAlpha 0.5
SetColor (color.red/2,color.green/2,color.blue/2)
.....
DrawPoly(poly)
If I do this exact same code in my drawing-routine nothing is drawn. I have to set the alpha to 1.0 (or higher than 0.5) for it to draw anything.
Its a minor point really, but I am not sure why the debugdraw routine can draw objects using this code when my routine can't. I think I must be missing something obvious, but i am not sure what.
Can someone enlighten me? - Thank you (I don't really understand a lot about alpha anyway - except it is like transparency)