Box2D wrapper plugin for DarkBasic Pro

back when I was using a similar language to his, all we pretty much had to do was generate x,y coordinates, grab a rotation vector and display the sprites on screen. However I never used Box2D (still taking a look at the examples and slowly progressing on my port) - However, doesn't the settings header manage the coordinate scales and also pixel size for the library so you pretty much cut on the calculations later on?

I'd be glad to learn more 🙂
Well what i'm struggling with is instead of using polygons with vertices
i'd like to use sprites (with the same shape as the underlying polygon)..
but the sprite takes a rotation and a position (world coordinates)
The problem is box2d gives the vertices for the polygon but i need
a world rotation and world center position. The problem for me is
when using compound shapes with local positions and rotations.
Mike
@Mike950
Box2D gives the rotation and position as well 😉 I just use that to rotate and position the sprites.
@Thanks Diggsey
I think you might run into problems though if you have a body
with compound shapes (specifically polygons) Since each shape
has a local rotation and position. But the rotation you're using
is for the body (i think?)..well..maybe you can test it for multiple
polygon shapes per body (a box will do since that's a poly)..
Just make sure each shape is offset from 0,0 some distance and has a local rotation
other than 0 if you test it.
The solution btw from Erin is to compose the shape's local transform with
the body world transform (i hope i got that right! 🙂)..
Thanks!
Mike

Original thread: https://box2d.org/forum/viewtopic.php?t=41