Truelegend
Member
|
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 |
|
Truelegend
Member
|
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 |
|
TBJokers
Member
|
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 |
|
Dandruff
Member
|
RE: Little problem with skeleton points.
you could try Players[0].mesh
|
|
04-11-2011 12:09 AM |
|
Truelegend
Member
|
Skeleton points - please help
What is wrong in first and second code?
I cant repair this.
Thanks for any help.
|
|
04-11-2011 10:26 AM |
|
llynx
Member
|
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 |
|
Truelegend
Member
|
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 |
|
llynx
Member
|
RE: Skeleton points - please help
(04-11-2011 01:23 PM)llynx Wrote: -use players[0].cskel....
|
|
04-11-2011 01:49 PM |
|
Truelegend
Member
|
RE: Skeleton points - please help
Okey. Thanks you very much bro.
|
|
04-11-2011 01:52 PM |
|
Driklyn
Member
|
RE: Skeleton points - please help
|
|
04-11-2011 10:39 PM |
|
Truelegend
Member
|
RE: Skeleton points - please help
Yeah but no one write back in these topics :(
|
|
04-12-2011 07:22 AM |
|
Dwight
Member
|
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 |
|
Driklyn
Member
|
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 |
|