Currently i have a non-animated non-rotated tank mesh that has collisions with a 3ds file. It works perfectly.
My problem is, whenever i rotate the tank the collision changes alittle bit. It seems as if the collision "mask" for the tank changes when i change rotation. Is this true? If yes. Then can i make it so the collision mask is constantly the same non-dependent of rotation or animation?
This is what i use for rotation:
Code: Select all
//XDir is the direction the character is facing, 1 right -1 left
draPlayer->setRotation(vector3df(0,objPlayer.YRot,0));
switch(objPlayer.XDir){
case 1:
if(objPlayer.YRot>180){
objPlayer.YRot-=10;
}else{objPlayer.YRot=180;}
break;
case -1:
if(objPlayer.YRot<360){
objPlayer.YRot+=10;
}else{objPlayer.YRot=360;}
break;
}
Code: Select all
//ColW,ColH,ColD are set to 10,20,10
ISceneNodeAnimator* anim = smgr->createCollisionResponseAnimator( selector , draPlayer , vector3df(objPlayer.ColW,objPlayer.ColH,objPlayer.ColD), vector3df(0,0,0) );
Thank you.
-Ali