Attaching a mesh(weapon) to a JointNode

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
Scripter
Posts: 6
Joined: Mon Dec 17, 2007 3:20 pm

Attaching a mesh(weapon) to a JointNode

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You might need to update to Irrlicht 1.4. Check the new API for proper handling of joints.
Scripter
Posts: 6
Joined: Mon Dec 17, 2007 3:20 pm

Post 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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post 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.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply