Hello, I’m using the 2dConstraints sample. I want to make objects without image sprites, just filling the 2d primitives with specific colors.
I don’t see how I can set the color of the sprite. I noticed it’s drawing the outline of the polygon with the Debug renderer, which is fine, but I have no idea how I can modify that debug fill color. I tried doing the following:
for v=1,vn do verts[v]=guys.shape:GetVertex(v) end --debugRend:AddPolygon(Vector3(1.2, -0.3,0), Vector3(2.5, -0.8,0), Vector3(2.8, -0.3,0), Vector3(2.8, 0.5,0),Color(1,0,0), false) local pos=guys.body:GetPosition() debugRend:AddPolygon(Vector3(verts+pos),Vector3(verts+pos),Vector3(verts+pos),Vector3(verts+pos),Color(1,1,1), false)
Because I just want to draw a polygon where these 2d rigid bodies are. But there is no function to find the position of the 2d rigid body. At least not that I can find…
Adding a polygon to the debug renderer lets me choose the color but then I can’t get the position of the body to draw. And for the 2d rigid bodies it appears they can only be drawn with image sprites?
Anyone know how I can just fill a 2d rigidbody with a color?