Now comes the problem, I can load the mesh like I do now, and have created a totaly differnt skeleton setup than I originaly had made where I was using a template of my scene with a joint for the base, and other joints spawning off of it to be connections for doors, and other things. I would simply create the entire level, and group meshes according to thier use, like doors. Then when ready to export, I would delete all the interaction items, and export what is left as a X file. Then I would individually export the interactive items with the same joints, and have them animated.
I got to thinking later that I may want to just use something that I read about Milkshape 3D meshes, and just attaching the object as a child, so I recreted them using thier own skeleton system, and would attach them to base joints that were ready for them from the scene, e.g. Door-base-joint1 and attach the door1's Door1-hinge joint as a child to the scenes joint ready made for it. Then set the frames for it.
Ok I never got around to this idea, and it sounded possiable, but when I set up this arrangement, and tested some things by loading all these objects without implementing the above idea in code, I found that the meshes load perfectly aligned without even using setposition, (Which come to think of it, it should!). So at present all I have to do is to set the proper frames to open and close the doors, no muss no fuss with attaching it as a child.
So now I decided that I want to just plain rotate the door without animation, so I fire up the code to rotate the puppys when I get to the point to open the door by using:
Code: Select all
// do a little dance, make a little love, get down tonight! :D
// old code when I animated the door
//doornode1->setFrameLoop(0, 13);
//doornode1->setAnimationSpeed(5);
doornode1->setRotation(core::vector3df(0,-90,0));
// turn off the use of the mouse opening the door
mouse_left = 0;
I may be misunderstanding the use of the setRotation function
core::vector3df as a param. Do I need to use something else to rotate the mesh on its own axis?