Box2D and Irrlicht

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Kordman916
Posts: 23
Joined: Sat Apr 03, 2010 3:44 am

Box2D and Irrlicht

Post 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.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post 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
Kordman916
Posts: 23
Joined: Sat Apr 03, 2010 3:44 am

Post by Kordman916 »

Thank you just post it here when you get a chance to upload it.
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post 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?
Kordman916
Posts: 23
Joined: Sat Apr 03, 2010 3:44 am

Post by Kordman916 »

Anyone else have any suggestions?
yaten
Posts: 41
Joined: Tue Nov 16, 2010 4:57 pm
Location: /home/yaten on a server somewhere East of Asia
Contact:

Post 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 ^_^
Brainsaw
Posts: 1177
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post 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.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
tonic
Posts: 69
Joined: Mon Dec 10, 2007 6:18 pm
Contact:

Post 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
yaten
Posts: 41
Joined: Tue Nov 16, 2010 4:57 pm
Location: /home/yaten on a server somewhere East of Asia
Contact:

Post 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!
Post Reply