Physics for irrlicht 1.8 ?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
JuggernautIRR
Posts: 21
Joined: Tue Jun 05, 2012 4:42 pm

Physics for irrlicht 1.8 ?

Post by JuggernautIRR »

Hello,

I am unable to find any physics wrapper that work with the recent version of irrlicht 1.8. Can anybody please direct me to PHYSX wrapper or BULLET wrapper
that work with iRRlicht version 1.8 ?

Thanks,
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Physics for irrlicht 1.8 ?

Post by hybrid »

Just recompile them, there are not so many API changes IMHO.
oringe
Posts: 41
Joined: Tue Jul 05, 2011 7:06 am
Location: San Francisco

Re: Physics for irrlicht 1.8 ?

Post by oringe »

I'd recommend just using Bullet without a wrapper. All you have to do is setup your includes, lib, and dependencies which can be tricky. But once that works, creating a physics world for your Irrlicht device is simple:

Code: Select all

#include <irrlicht.h>
#include <btBulletCollisionCommon.h>
#include <btBulletDynamicsCommon.h>
 
int main()
{
    IrrlichtDevice *device =
        createDevice( video::EDT_OPENGL, dimension2d<u32>(640, 480), 16, false, false, false, 0);
 
    // BULLET PHYSICS
    btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration ();
    btBroadphaseInterface* broadPhase = new btAxisSweep3 (btVector3 (-1024, -1024, -1024), btVector3 (1024, 1024, 1024));
    btCollisionDispatcher* dispatcher = new btCollisionDispatcher (collisionConfiguration);
    btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver ();
    btDiscreteDynamicsWorld* world = new btDiscreteDynamicsWorld (dispatcher, broadPhase, solver, collisionConfiguration);
 
    while(device->run())
    {
        driver->beginScene(true, true, SColor(255,100,101,140));
        // do work...
        driver->endScene();
    }
    device->drop();
    return 0;
}
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Physics for irrlicht 1.8 ?

Post by serengeor »

oringe wrote:I'd recommend just using Bullet without a wrapper.
I agree. Though then you would be writing your own wrapper, but at least you'd have full control of it.
Working on game: Marrbles (Currently stopped).
Post Reply