SetJointMode (EJUOR_CONTROL) trouble

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
fjpeces
Posts: 8
Joined: Mon Dec 13, 2010 10:19 am

SetJointMode (EJUOR_CONTROL) trouble

Post by fjpeces »

Hello,

I have a DirectX model loaded in irrlicht, I have set up the cameras with their correct parameters. Well my model has a skeleton attached.

At this point, all is working well. I watch my model in irrlicht window.

But the problem come when i want to modify the bones position.

More accuracy, when i write in my code SetJointMode (EJUOR_CONTROL), my model is moved and consequently i don't watch my model in the same view as before to put this instruction.

Anybody can help me?? I don't know where is my problem. I thought this instruction didn't modify the position of the model.
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

No idea what you`re doing, but usually this is the way you do when using EJUOR_CONTROL (in case you`re doing sth wrong):

scene initialization:
1) create your node and setup the animation, loop, speed etc.
2) set node->setJointMode(scene::EJUOR_CONTROL);

app run:
3) node->animateJoints() ; // call Irrlicht to animate the node
4) position/rotate the joints manually
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
fjpeces
Posts: 8
Joined: Mon Dec 13, 2010 10:19 am

Solved!

Post by fjpeces »

The problem was about the way to generate in Blender the directX model. I generated the model without enabling the swap z option in the directX exporter. When I load a directX model generated enabling this option doesn't happen when I added the instruction setjointmode(EJUOR_CONTROL).

I think, the problem is that my model has values of coordinate z negatives without swapping the z axis.

So that now all is working well!!

thank you!
Post Reply