I have a animated model of my player and i want the camera to move with its animation.
So if the modell jumps the camera moves the same way, like a childnode but moving with the animation of the character.
I don't know how to explain it, but i want something like the camera does in this video:
http://www.youtube.com/watch?v=3N27BKwC_0Y
Camera to Character-animation
Camera to Character-animation
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
Re: Camera to Character-animation
Guess only:
you may try parenting the camera to the head of the animated mesh scene node:
Regards from smso
you may try parenting the camera to the head of the animated mesh scene node:
Code: Select all
scene::IAnimatedMeshSceneNode* node = ...
scene::IBoneSceneNode* head = node->getJointNode("head");
if (head)
camera->setParent(head);
Re: Camera to Character-animation
I have to set a name for the joint while moddeling and then just call it in my code?
So in your example the name of the joint is "head" !?
So in your example the name of the joint is "head" !?
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
My Forum: http://game-home.1x.de/
My Homepage: http://mediadesign.about.lc/
///////////////////////////////////////////
Re: Camera to Character-animation
A named joint node would make the code easier to understand. On the other hand, joint node can also be referred to by an id.804 wrote:I have to set a name for the joint while moddeling and then just call it in my code?
So in your example the name of the joint is "head" !?
Code: Select all
virtual IBoneSceneNode* irr::scene::IAnimatedMeshSceneNode::getJointNode (u32 jointID);
Regards from smso.