Fex
Gold Supporter
|
rot member removed from AnimatedSkeletonBone
Updated the engine and it broke how I was making the character "look around" while on a horse.
Recent update removed AxisRoll rot from AnimatedSkeletonBone.
From Animation/skeleton.h
Code:
#define HAS_ANIM_SKEL_ROT 0
Code:
struct AnimatedSkeletonBone // Bone of an Animated Skeleton
{
// these parameters may be manually changed during animation process, they are in parent space:
Orient orn ; // target orientation
Vec pos , // offset position
scale; // scale factor
#if HAS_ANIM_SKEL_ROT
AxisRoll rot ; // relative rotation
#endif
...
};
#endif
My project uses "rot" like below, how
Code:
if(on_horse_and_horse_exists())
{
skel.findBone("Bip01 Spine").rot.roll = angle.x * -0.40;
skel.findBone("Bip01 Spine").orn.rotateCross(angle.y * 0.25);
skel.findBone("Bip01 Spine1").rot.roll = angle.x * -0.40;
skel.findBone("Bip01 Spine1").orn.rotateCross(angle.y * 0.25);
skel.findBone("Bip01 Neck").rot.roll = angle.x * -0.15;
skel.findBone("Bip01 Neck").orn.rotateCross(angle.y * 0.25);
skel.updateMatrix();
}
How should this be done now?
Thanks.
|
|
08-05-2022 01:33 PM |
|
Esenthel
Administrator
|
RE: rot member removed from AnimatedSkeletonBone
instead of rot.roll you can do orn.rotateDir
alternatively:
orn.rotateY for spine0
orn.rotateZ for spine1..neck..head
|
|
08-05-2022 02:22 PM |
|
Fex
Gold Supporter
|
RE: rot member removed from AnimatedSkeletonBone
Thanks for the prompt reply
|
|
08-07-2022 04:46 PM |
|