Page 1 of 1

Attaching a mesh(weapon) to a JointNode

Posted: Mon Dec 17, 2007 3:33 pm
by Scripter
Im trying to attach a mesh(which is a weapon) to another mesh(the player) and on player there is a joint node called mount1 which updates and follow the player animation corretly. On the weapon there is a node mountpoint so that u can connect it to the mount1 on the player. Im getting some strange problem when the joints are update, i get the value for absolutePosition to 1.#QNAN00 which seems to me Not a Number.

irr::scene::ISceneNode* mMeshPointLeft = obj->mAnimatedMesh->getXJointNode("mount1");

i create a node for the mount1 point and the obj is drawn and update every frame. At init the node has normal values but just after one frame its corrupted.

One have any ides to this problem or maybe another solution?

(Im using the Mech warrior pack from 3drt and i have to export them to .X format, i had problem with another node when exporting to left hand style)

Thx

Posted: Tue Dec 18, 2007 12:26 am
by hybrid
You might need to update to Irrlicht 1.4. Check the new API for proper handling of joints.

Posted: Tue Dec 18, 2007 9:25 am
by Scripter
Im working with Irrlicht 1.4 but i think the problem is that the .X file is corrupted in some way. That when the first frame happens it multiplys the bones so that the mountpoint becomes 1.#QNAN0

Posted: Tue Dec 18, 2007 10:16 am
by hybrid
Try to load the file with the meshviewer (example 9). You can enable debug effects, such as showing the skeleton. This should help you with checking the internal structure of your mesh. The meshviewer from DX-SDK might also help.

Posted: Wed Dec 19, 2007 8:07 pm
by bitplane
What modeling software and exporter are you using?
Please try converting and exporting a free model, and if the same thing happens post a link to it for testing.