weapon placeholder export

jchmack

19-01-2008 20:52:36

I am trying to make a placeholder for my characters weapons. How could i do this? I am thinking that maybe i could use a prop with my biped but i can't seem to get it to export along with the mesh. Right now i am just attaching the weapon manually and it seems to work fine but in the future i would like to have animations where the weapon might switch hands/ be thrown etc. Is there a way i can have an arbitrary placeholder like a bone that i can always attach my weapons to when i get them into ogre?

Evak

20-01-2008 06:53:34

I havent done anything with characters, but with vehicles we just made a mount node and linked it to a parent mesh. I believe you need the pro version to create heirarchical links without creating bones.

If you have the pro version you can just link a node to a parent mesh, give it a name like gunmount and using the ofusion scene loader, find the gunmount by name and attach whichever type of gun you want to it in code. If you set the orientation of the gun mount node correctly the gun can easily be placed in the correct position.

I'm not sure how you would do this with a biped, you may just be able to link the node to a bone of any old biped after its been skinned. thats how it worked for me with other engines. We havent really done anything much with characters yet in out ogre projects.

jchmack

22-01-2008 17:56:28

Sigh i only have CE of Ofusion. Pro always sounds so nice. But im just a student, and if the price for pro is anything like the price for many other game development libraries/tools i cant afford it lol. If i could i wouldn't be using ogre in the first place =).

But thank you for the reply.

edit. If i did have pro would i be able to animate this gun node? I mean independently of any bones the character has? Couldn't i just add another bone and only have it there for a weapon placeholder? But i guess i am using bipeds so i cant really add bones to them.

Lioric

24-01-2008 21:38:04

If you are using the skin modifier you can add a bone to the skeleton (and add it to the bone list in the modifier) it will be exported with the .skeleton file and you can use it as a placeholder bone

jchmack

26-01-2008 21:54:30

ah exactly the sort of thing i was looking for. Thx a lot lioric =)