how do you actually attach weapon to the ms3d model?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
cdi
Posts: 1
Joined: Tue Oct 14, 2003 5:18 pm

how do you actually attach weapon to the ms3d model?

Post by cdi »

Can someone teach me how to attach a ms3d weapon model to the ms3d model using the irrlicht engine? assuming i have the models and the skeletal ready.
:cry:

Thank you in advance
Begone those who defies logic..!
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Straight from the help file -
virtual ISceneNode* irr::scene::IAnimatedMeshSceneNode::getMS3DJointNode ( const c8 * jointName ) [pure virtual]

Returns a pointer to a child node, wich has the same transformation as the corrsesponding joint, if the mesh in this scene node is a ms3d mesh. Otherwise 0 is returned. With this method it is possible to attach scene nodes to joints more easily. In this way, it is for example possible to attach a weapon to the left hand of an animated model. This example shows how:

ISceneNode* hand =
yourMS3DAnimatedMeshSceneNode->getMS3DJointNode("LeftHand");
hand->addChild(weaponSceneNode);

Please note that the SceneNode returned by this method may not exist before this call and is created by it.
Parameters:
jointName: Name of the joint.

Returns:
Returns a pointer to the scene node which represents the joint with the specified name. Returns 0 if the contained mesh is not an ms3d mesh or the name of the joint could not be found.
Crud, how do I do this again?
Post Reply