Search found 25 matches
- Fri Feb 23, 2018 6:17 pm
- Forum: Box2D tutorial discussion
- Topic: Add code to the file library Joints
- Replies: 1
- Views: 54321
Add code to the file library Joints
Can I change the code in library files, for example, in joins ?
- Thu Nov 09, 2017 5:09 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon
Yes I found a solution in the source code testbed, and then I saw a piece of code I was looking for in your codeYou can also see how it works by referring to the standard Box2D testbed.




- Tue Nov 07, 2017 7:06 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon

You can say me about World.DrawDebugData();
a little normal documentation for box2d. I didn't think it works that simple
- Tue Nov 07, 2017 3:14 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon




I watched all!
I haven't found this scene here.







- Tue Nov 07, 2017 2:53 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon
iforce2d What is the file include this scene??
Please give me this code.
Please give me this code.
I use code from DebugDraw.cpp originally!!Please look at the source code (DebugDraw.cpp), all shapes are already implemented.
- Mon Nov 06, 2017 4:22 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon
it would be great if you added in the example drawing the polygon
- Mon Nov 06, 2017 4:20 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon
Questions about rendering are not really the topic for this forum. The method will depend on your rendering API and there are many different cases. If you are using SDL2, maybe you could try the example I made: https://www.iforce2d.net/rube/?panel=loaders I did it using your example. But in your ex...
- Mon Nov 06, 2017 4:17 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon
I did a lot of things for clarity. One object of the same fliesHow about just drawing one single thing at a time, I don't see how you can debug a crazy situation with dozens of things all moving around that fast. Start small.
- Mon Nov 06, 2017 4:13 pm
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon
I try another code: if (shape->GetType() == b2Shape::e_polygon) // Если полигон { b2PolygonShape* poly = (b2PolygonShape*)shape; int count = poly->GetVertexCount(); b2Vec2* vertices= (b2Vec2*)poly->m_vertices; for (int i = 0; i < count; i++) { vertices[i] = poly->GetVertex(i); } debugDraw.DrawPolygo...
- Mon Nov 06, 2017 4:55 am
- Forum: Box2D tutorial discussion
- Topic: debug draw and polygon
- Replies: 15
- Views: 161446
Re: debug draw and polygon
for (b2Body* it = World.GetBodyList(); it != 0; it = it->GetNext()) { for (b2Fixture *fixture = it->GetFixtureList(); fixture; fixture = fixture->GetNext()) { b2Shape *shape = (b2Shape*)fixture->GetShape(); if (shape->GetType() == b2Shape::e_polygon) // { b2PolygonShape* poly = (b2PolygonShape*)sha...