View Full Version : Gotta BIG problem with bones!! HElp Pleas!
I've created a model of man and given him animations and skeleton.
Now I 've made a lot of weapons for him i I dont know how to give it him in game. I was trying to add bone of sword to hand's bone in model but it makes errors. Please Help me any way you want. Please.
Mathew.
Sorry for my language and any mistakes..
Thanks.
Philipp
01-06-2003, 12:54 AM
hi maku,
if your created model is type of "md2" then try do the following:
somewhere're your TGLActors declared
YourActorModel.LoadFromFile('filename.md2');
YourWeaponActor.LoadFromFile('filename.md2');
YourWeaponActor.Synchronize(YourActorModel); // use the same animations as youractormodel
if its all kind of "smd" then this code should work :P *should*
YourModelActor.LoadFromFile('yourbasemodel.smd');
YourModelActor.AddDataFromFile('animation1.smd');
// ...
YourWeaponActor.LoadFromFile('yourbaseweaponmodel. smd');
YourWeaponActor.Synchronize(YourModelActor);
erm.. you could also see the demos in :
/glscene/demos/meshes/skeletal
/glscene/demos/meshes/actor
hth
regards,
philipp
p.s. you can also try to ask on the iRC channel irc.voidzero.com#glscene
I'am using SMD. I was trying to synchronize but it does not work.
I'll try MD2.
Great Thanks for reply Philipp
Did you remember to make the weapon actor a child of the character actor?
stuart
02-06-2003, 03:55 AM
You'll need to update the weapon position each frame, put this in something like a GLCadencer OnProgress event:
Weapon.Matrix:=GLActor1.Skeleton.BoneByID(THE_BONE _ID).GlobalMatrix;
IIRC, the weapon needs to be a child of the actor (could be wrong on that one). THE_BONE_ID is the ID of the hand I would guess.
Good luck,
Stuart.
I'll try it!
I dont know what would i do without your help - my "delphi friends".
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.