Keyframed to Dynamic transition problem

Keyframed to Dynamic transition problem

Hi, 

I've a series of rigid body birds whose motion types are MOTION_KEYFRAMED. The requirement is that when the bird is hit by a bullet, it has to be converted to MOTION_DYNAMIC or to a similar motion type. But unfortunately the motion type does not change. The code snippet is as follows:

hkpRigidBody* rb = getRigidBody();
rb->setMotionType(hkpMotion::MOTION_DYNAMIC);
if(hkpMotion::MOTION_DYNAMIC == rb->getMotionType()){
   std::cout << " succeeded." << std::endl;
} else {
   std::cerr << " failed!" << std::endl;
}

Even if i consider the possibility the motion type can be changed some time later, causing the query to return false, thisis not the case, the rigid body continues to be MOTION_KEYFRAMED.

I'm using Havok 2012.1.0.r1 SIMD VS 2010 version.

Do you have any idea what can be the cause? 

Thanks for advance,

Umut

2 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Hi,

Sorry for the question itself, it's  a a question of poor document reading, my mistake. Keyframed or fixed rigid bodies's motion types cannot be changed after creation.

Thanks, 

Umut

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!