Results 1 to 6 of 6

Thread: Gotta BIG problem with bones!! HElp Pleas!

  1. #1
    maku
    Guest

    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.

  2. #2

    Gotta BIG problem with bones!! HElp Pleas!

    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 *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

  3. #3
    maku
    Guest

    Thanks...

    I'am using SMD. I was trying to synchronize but it does not work.
    I'll try MD2.

    Great Thanks for reply Philipp

  4. #4

    Gotta BIG problem with bones!! HElp Pleas!

    Did you remember to make the weapon actor a child of the character actor?
    There are 10 kinds of people:
    <br />Those who know binary,
    <br />And those who don't.

  5. #5

    Gotta BIG problem with bones!! HElp Pleas!

    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.

  6. #6
    maku
    Guest

    Thanks

    I'll try it!
    I dont know what would i do without your help - my "delphi friends".

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •