SVN version, md2 models, CollisionResponseAnimator

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
nzervu
Posts: 17
Joined: Tue Oct 21, 2008 7:44 pm

SVN version, md2 models, CollisionResponseAnimator

Post by nzervu »

The title is a bit confusing, sorry about that.

I have a problem with SVN version, md2 models and CollisionResponseAnimator. My code worked fine with irrlicht 1.4.2 , and 1.5, but I had to use SVN version because I had problems with 1.5 when loading more than once the same md2 mesh.

Now with the SVN version when adding CollisionResponseAnimator to my SceneNode I cannot move it.

Code looks like::

//EmptySceneNode with child AnimatedMeshSceneNode md2

ISceneNode* sn=sm->addEmptySceneNode();
IAnimatedMesh* mesh=sm->getMesh("bla.md2");
if (mesh)
amsnMD2=sm->addAnimatedMeshSceneNode(mesh,sn); //parent sn

//create map selector
mapSelector = sm->createTerrainTriangleSelector(terrain, 0);
terrain->setTriangleSelector(mapSelector);

//add collision
if(mapSelector){
ISceneNodeAnimatorCollisionResponse* anim = sm->createCollisionResponseAnimator(
mapSelector,
sn,
radius, //ellipsoidRadius
vector3df(0,-5,0)); //gravity

mapSelector->drop();
sn->addAnimator(anim);
anim->drop();
}

Am I doing something wrong? This worked fine with both 1.4.2 , 1.5

note1:I m using EmptySceneNode as parent for helping my self with some translations and rotations.
note2: When not adding animator models move fine (or fly fine....)
nzervu
Posts: 17
Joined: Tue Oct 21, 2008 7:44 pm

Post by nzervu »

I rolled back to 1.4.2 but 1.4.2 has problems with getTime() under windows and that's causing me a lot of problems.

Is there any solution?I m really stuck...help please...
Post Reply