About Store Forum Documentation Contact



Post Reply 
rot member removed from AnimatedSkeletonBone
Author Message
Fex Offline
Gold Supporter

Post: #1
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
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
Find all posts by this user Quote this message in a reply
Fex Offline
Gold Supporter

Post: #3
RE: rot member removed from AnimatedSkeletonBone
Thanks for the prompt reply
08-07-2022 04:46 PM
Find all posts by this user Quote this message in a reply
Post Reply