[solved] Problem with bones

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
RenoRosco
Posts: 11
Joined: Sat Sep 15, 2007 7:26 am

[solved] Problem with bones

Post by RenoRosco »

Hello,

i have a problem with bones. searched my code and the forums for hours but found nothing that helped.
I Have a model (3ds fileformat) where a bone is in it. I want to attach a weapon to that bone but if i read the bone with getJointNode("weapon_slot") i get nothing.

My code:

Code: Select all

 
    IAnimatedMesh* mesh = smgr->getMesh("spaceship.3ds");
    IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
    ISceneNode* bone=node->getJointNode("weapon_slot");
    if(bone) vector3df pos=bone->getPosition();    
Why is the bone not loaded / found? if i load the model in 3DStudio the bone is there and the name is also the correct?

Thx for Help
Last edited by RenoRosco on Mon Mar 03, 2008 3:05 pm, edited 1 time in total.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

3ds format does not support bones, you need to use something like .x, .ms3d or .b3d
Image Image Image
RenoRosco
Posts: 11
Joined: Sat Sep 15, 2007 7:26 am

Post by RenoRosco »

thats what i tought about but if i load it in 3DStudio there was a bone so i thought i got the error in the code or something else.

Thank you for your fast reply
Post Reply