Page 1 of 1

Box2D and Irrlicht

Posted: Thu Dec 02, 2010 2:14 am
by Kordman916
Hey everyone,

I haven't seen many posts on integrating Box2D and Irrlicht so I had a question:

If I were to use Box2D how would I go about getting it to work alongside Irrlicht?

I've built it and compiled the examples and it seems simple enough but I just can't figure out how to combine Box2D and Irrlicht.

I would be using Box2D in a 3D game constrained on 2-axises.

Would I just use Box2D and position my 3D shapes accordingly to the rotation and position of the 2D shapes or what?

EDIT:
If you don't have any Box2D info I am also looking for the same help with Chipmunk physics.

Any help would be greatly appreciated.

Posted: Fri Dec 03, 2010 2:51 pm
by Lonesome Ducky
I've got an example program that integrates Box2D with irrlicht, I'll try getting it to you when I get on my home computer. Just be aware that Box2D is useless for 3D physics. You can, like you said, use 3D objects on a 2D coordinate plane. My example uses 3D billboards to fake 2D images and rotation. I'll get it to you as soon as I can

Posted: Sat Dec 04, 2010 2:10 am
by Kordman916
Thank you just post it here when you get a chance to upload it.

Posted: Sat Dec 04, 2010 2:52 am
by Lonesome Ducky
And it seems like the code is no longer with me :( I seem to remember another person on the forums who created an example of irrlicht with Box2D, have you tried searching the forums?

Posted: Wed Dec 08, 2010 3:36 am
by Kordman916
Anyone else have any suggestions?

Posted: Thu Dec 16, 2010 11:12 am
by yaten
I'd be very glad to see an example of how to use Box2D with irrlicht as well ^_^ I used to have Box2D plugin on my old 3D engine which I dumped in favor of irrlicht ^_^

Posted: Fri Dec 17, 2010 6:33 am
by Brainsaw
I don't know of any Box2D wrapper for Irrlicht, and I normally read all physics wrapper threads do I know what's going on there, so I guess you'd have to write one yourself.

Posted: Sun Jan 02, 2011 2:21 pm
by tonic
Here's at least one starting point, an Irrlicht version of the Box2D debug drawing API:

http://jet.ro/files/B2DebugDrawIrr.zip

I made this little prototype game with Box2D & Irrlicht: http://jet.ro/games/prototypes/luomuhei ... pinheitto/
First thing I made was that debug drawing API. After the gameplay was mostly tuned, I replaced the debug rendering with image rendering through my Turska library: http://jet.ro/turska/ - It supports rendering through Irrlicht (as well as OpenGL with optionally also SDL image loading). If you want to use it, be sure to grab latest version from SVN, the current download package (2.0.0) is quite old. http://code.google.com/p/turska/source/checkout

Posted: Sun Jan 02, 2011 2:31 pm
by yaten
wow! thanks sir tonic, now i have 2 references for box2d+irrlicht,
your version and sir cobra's version ^_^

sir cobra's sample of box2d+irrlicht:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=42350

thanks to both of you ^_^

happy new year!