like the bones in above picture. how to get the vector that stands for bone2 and the length of bone2. After get the vector and length, I will try to do some vector add computation.
Even though I read the API help file, but cann't understand those func exactly stand.
how to get bone's vector and bone's length?
-
sunrisefe
- Halfling
- Posts: 42
- Joined: Mon Oct 06, 2008 7:43 am
-
psquare
- Hobgoblin
- Posts: 554
- Joined: Tue Nov 14, 2006 3:26 pm
- x 7
Re: how to get bone's vector and bone's length?
Bone is a node. You can use all these functions:
http://www.ogre3d.org/docs/api/html/cla ... 14760eaca3
http://www.ogre3d.org/docs/api/html/cla ... 661e4d697b
etc.
Bone doesn't have a concept of a 'length' AFAIK. You must mean the distance between two 'bones'. You can use the above getPosition function above to find the relative distance.
There's some posts here on 'world position of bone' here in the forum. Just search the quoted keywords.
Hope that helps.
http://www.ogre3d.org/docs/api/html/cla ... 14760eaca3
http://www.ogre3d.org/docs/api/html/cla ... 661e4d697b
etc.
Bone doesn't have a concept of a 'length' AFAIK. You must mean the distance between two 'bones'. You can use the above getPosition function above to find the relative distance.
There's some posts here on 'world position of bone' here in the forum. Just search the quoted keywords.
Hope that helps.
-
sunrisefe
- Halfling
- Posts: 42
- Joined: Mon Oct 06, 2008 7:43 am
Re: how to get bone's vector and bone's length?
I see. Thank you.
- fassihi
- Goblin
- Posts: 215
- Joined: Sat Sep 16, 2006 6:51 am
- x 8
- Contact:
Re: how to get bone's vector and bone's length?
Yes the best would be to get the skeleton from an entity, the the bone having the bone name from the skeleton, get the position and orientation from this bone, have in mind that these are relative to the object and you would need to consider the main node positions and orientations too.
As far as the bone size, the difference between two neighboring bone positions should provide you the number you need.
As far as the bone size, the difference between two neighboring bone positions should provide you the number you need.