About Store Forum Documentation Contact



Post Reply 
Skeleton points - please help
Author Message
Truelegend Offline
Member

Post: #1
Little problem with skeleton points.
Code:
Meshes("../data/obj/chr/skeleton/0.mesh")->draw(cskel);
I want replace "data/obj/chr/skeleton..." with my player object from world editor.

So i tried put Players[0] but i didnt work. Can anyone help with this?
04-10-2011 06:33 PM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #2
What is bad with this code?
Code:
void Render()
{
    switch(Renderer())
    {
    case RM_PREPARE:
        {
            LightDir(Vec(0,0,-1),1-D.ambColor()).add();
            /************************************/
            
            /************************************/
            {
                
                
                C OrientP &hand_r = Players[0].mesh()->skeleton()->getPoint("HandR");
                  Matrix  m;
                  m.setPosDir(hand_r.pos, hand_r.perp, hand_r.dir)
                      .scaleOrn(1.7f);
                  Meshes("Obj/Item/Weapon/Sword/0/0.mesh")->draw(m);

            }
            /************************************/
        }break;
    }
    Game::World.draw();
}

void Draw()
{
    Renderer(Render);

    /***********************************/
    D.clearZ();
    SetMatrix();
    //Players[0].mesh()->skeleton->getPoint("HandR").draw(RED);
    /***********************************/
}

Game is building and i can play. but i can see sword in hands :(
04-10-2011 08:46 PM
Find all posts by this user Quote this message in a reply
TBJokers Offline
Member

Post: #3
RE: What is bad with this code?
//Players[0].mesh()->skeleton->getPoint("HandR").draw(RED);

You should undo the // and see if you can see the skeleton, if now then you can start wonder.

Man, it's always that semicolon...
04-10-2011 09:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #4
RE: Little problem with skeleton points.
you could try Players[0].mesh
04-11-2011 12:09 AM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #5
Skeleton points - please help
[Image: pokaz.png]

What is wrong in first and second code?
I cant repair this.

Thanks for any help.
04-11-2011 10:26 AM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #6
RE: Skeleton points - please help
-use players[0].cskel.... to draw the bone/or skeleton
-You instantiate a matrix and then set apply setPosDir to that matrix then never use the newly created matrix.
-the Orientation of the point HandR of the mesh != the Orientation of the bone HandR of the mesh != the Orientation of the bone HandR of the cskel

Please go through all of the tutorials because after you do that you'll know what controls what and from there you'll be able to do what you're trying to achieve.
04-11-2011 01:23 PM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #7
RE: Skeleton points - please help
I go trough tutorial Animation/Skeletal Points.cpp

But how i can get the player point/bone from the Players container (World Editor) ?
04-11-2011 01:45 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #8
RE: Skeleton points - please help
(04-11-2011 01:23 PM)llynx Wrote:  -use players[0].cskel....
04-11-2011 01:49 PM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #9
RE: Skeleton points - please help
Okey. Thanks you very much bro.
04-11-2011 01:52 PM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #10
RE: Skeleton points - please help
No need to keep creating new threads over the same topic. That's why there's a reply button.

These threads can all be merged into one:

http://www.esenthel.com/community/showth...p?tid=3429
http://www.esenthel.com/community/showth...p?tid=3430
http://www.esenthel.com/community/showth...p?tid=3432
04-11-2011 10:39 PM
Find all posts by this user Quote this message in a reply
Truelegend Offline
Member

Post: #11
RE: Skeleton points - please help
Yeah but no one write back in these topics :(
04-12-2011 07:22 AM
Find all posts by this user Quote this message in a reply
Dwight Offline
Member

Post: #12
RE: Skeleton points - please help
(04-12-2011 07:22 AM)Truelegend Wrote:  Yeah but no one write back in these topics :(

You have always gotten a reply on a per topic basis... ?

SnowCloud Entertainment - We are recruiting!
http://www.sc-entertainment.com
04-12-2011 08:15 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #13
RE: Skeleton points - please help
^^ Exactly.

If no one responds on a topic of yours for a few days and you still need help, just add a new reply to it so it will get bumped back up and re-noticed again. There's no need for multiple threads over the same issue. That just creates clutter.
04-13-2011 07:24 AM
Find all posts by this user Quote this message in a reply
Post Reply