hubbel
08-01-2007 21:40:09
Hi everyone!
Has anyone ever had a problem like this? My app using OgreNewt works fine, but when I apply an MaterialID and a MaterialPair (in this case to remove friction between the floor and the camera-object), I get an access violation inside the Newton.dll. Since Newton itself is closed source, I cannot debug this any further.
Any ideas?
Btw: Thanks to Walaber for his great work!
All necessary variables are initialized. The first command issued at the material_pair2 (setDefaultFriction) works fine, execution crashes when invoking the second command (setDefaultSoftness).
If I delete those calls to the materialpair-functions, in the later-on code the physics-world does exactly one loop and in the second one it crashes. It appears that no matter what I do, when using materials, the second call to a function inside newton.dll crashes.
Has anyone ever had a problem like this? My app using OgreNewt works fine, but when I apply an MaterialID and a MaterialPair (in this case to remove friction between the floor and the camera-object), I get an access violation inside the Newton.dll. Since Newton itself is closed source, I cannot debug this any further.
Any ideas?
Btw: Thanks to Walaber for his great work!
m_pFloorMaterial = new OgreNewt::MaterialID(m_pPhysicsWorld, 100);
m_pPlayerMaterial = new OgreNewt::MaterialID(m_pPhysicsWorld, 200);
OgreNewt::MaterialPair* material_pair2 = new OgreNewt::MaterialPair( m_pPhysicsWorld, m_pFloorMaterial, m_pPlayerMaterial);
material_pair2->setDefaultFriction(0.0f, 0.0f);
material_pair2->setDefaultSoftness(1);
material_pair2->setDefaultElasticity(0);
material_pair2->setContinuousCollisionMode(0);
All necessary variables are initialized. The first command issued at the material_pair2 (setDefaultFriction) works fine, execution crashes when invoking the second command (setDefaultSoftness).
If I delete those calls to the materialpair-functions, in the later-on code the physics-world does exactly one loop and in the second one it crashes. It appears that no matter what I do, when using materials, the second call to a function inside newton.dll crashes.