0

Actual problem

I'm working with Ogre3D 1.7 and I am trying to build the OgreBullet library (wrapper for the Bullet 2.82 Physics librairy) but I've got some casting errors :

1>..\..\src\OgreBulletCollisionsRay.cpp(87): error C2664: 'OgreBulletCollisions::Object *OgreBulletCollisions::CollisionsWorld::findObject(Ogre::SceneNode *) const' : impossible de convertir le paramètre 1 de 'const btCollisionObject *' en 'Ogre::SceneNode *'

I didn't modify the code so I do not understand why it can't compile ? Did someone had this error ?

EDIT (previous errors resolved):

If you have this error

1>..\..\src\OgreBulletCollisionsWorld.cpp(226): error C2440: 'static_cast' : impossible de convertir de 'const btCollisionObject *' en 'btCollisionObject *'

Try replacing static_cast by const_cast in the following lines :

btCollisionObject* obA = const_cast<btCollisionObject*>(contactManifold->getBody0());
btCollisionObject* obB = const_cast<btCollisionObject*>(contactManifold->getBody1());
Dali
  • 344
  • 1
  • 10
  • 1
    well it needs to be a `const_cast`, maybe the API changed, are you sure you have the exact version of bullet that they were using? – PeterT Aug 07 '14 at 12:14
  • Ok that was the solution for this error, I just managed to solve the problem with your solution. The Bullet version is maybe more recent than the one that was use for the wrapper. – Dali Aug 07 '14 at 12:23
  • Do you now something about the other error that appeared ? 1>..\..\src\OgreBulletCollisionsRay.cpp(87): error C2664: 'OgreBulletCollisions::Object *OgreBulletCollisions::CollisionsWorld::findObject(Ogre::SceneNode *) const' : impossible de convertir le paramètre 1 de 'const btCollisionObject *' en 'Ogre::SceneNode *' – Dali Aug 07 '14 at 12:27
  • I would contact the author or whatever help forums there are at this point, I'm not sure what the intend there is. Stackoverflow isn't really a good place to solve your issue. – PeterT Aug 07 '14 at 13:58

0 Answers0