Search found 25 matches

by FLYNSXCOOL
Fri Feb 23, 2018 6:17 pm
Forum: Box2D tutorial discussion
Topic: Add code to the file library Joints
Replies: 1
Views: 16377

Add code to the file library Joints

Can I change the code in library files, for example, in joins ?
by FLYNSXCOOL
Thu Nov 09, 2017 5:09 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

Re: debug draw and polygon

You can also see how it works by referring to the standard Box2D testbed.
Yes I found a solution in the source code testbed, and then I saw a piece of code I was looking for in your code :mrgreen: :mrgreen: :mrgreen: :D
by FLYNSXCOOL
Tue Nov 07, 2017 7:06 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

Re: debug draw and polygon

Image

You can say me about World.DrawDebugData();

a little normal documentation for box2d. I didn't think it works that simple
by FLYNSXCOOL
Tue Nov 07, 2017 3:14 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

Re: debug draw and polygon

:mrgreen: :mrgreen: :mrgreen: :mrgreen:

I watched all!
I haven't found this scene here. :cry: :cry: :cry: :cry: :cry: :cry: :cry:
by FLYNSXCOOL
Tue Nov 07, 2017 2:53 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

Re: debug draw and polygon

iforce2d What is the file include this scene??
Please give me this code.
Please look at the source code (DebugDraw.cpp), all shapes are already implemented.
I use code from DebugDraw.cpp originally!!
by FLYNSXCOOL
Mon Nov 06, 2017 4:22 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

Re: debug draw and polygon

it would be great if you added in the example drawing the polygon
by FLYNSXCOOL
Mon Nov 06, 2017 4:20 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

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...
by FLYNSXCOOL
Mon Nov 06, 2017 4:17 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

Re: debug draw and polygon

How 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.
I did a lot of things for clarity. One object of the same flies
by FLYNSXCOOL
Mon Nov 06, 2017 4:13 pm
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

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...
by FLYNSXCOOL
Mon Nov 06, 2017 4:55 am
Forum: Box2D tutorial discussion
Topic: debug draw and polygon
Replies: 15
Views: 53454

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...