Need some help...

Ridhan

12-12-2006 17:22:14

Hi.
I've made a character in nxogre and everything it's working fine. Now, this character it's the typical hero, with sword in hand, slashing away everyone that stands in front of him :D , but... i'm having problems attaching the sword on the character. I need, of course, to attach a body to the hand of my character to make it collidable, but i've been able to attach just an entity to the hero's hand so far, through attachEntityToBone() method.
Well, basically my question is if there's another way to attach a body to my hero's hand.

Thanks for your answers :D

Bluesoma

12-12-2006 17:58:27

Off the wall guess here, but you try creating a body for the sword and then using the entity associated with the body to attach it to the character?

Kind of like:

body sword=createBody(stuff for sword body here);
bonewhatevername->attachEntityToBone(sword->mEntity);

Ridhan

13-12-2006 13:17:55

In that case, tha application crashes because the sword entity is attached to the Node created by the Body, and it's not possible to attach it to the bone and keep it attached to the node.