Exemplo n.º 1
0
 public static void Register(CharBody actor)
 {
     actor.getIK().solver.OnPostInitiate += new IKSolver.UpdateDelegate(PostInitiateCalled);
     foreach (IKEffector effector in actor.getIK().solver.effectors)
     {
         _effectorsToActors.Add(new EffectorAndActor(effector, actor));
     }
 }
Exemplo n.º 2
0
 public static void MakeVisible(CharBody actor)
 {
     foreach (IKEffector effector in actor.getIK().solver.effectors)
     {
         //effector.target = effector.bone;
         GameObject.CreatePrimitive(PrimitiveType.Cube).AddComponent <EffectorVisible>().reference = effector;
         GameObject.CreatePrimitive(PrimitiveType.Cube).AddComponent <BoneVisible>().reference     = effector;
     }
 }
Exemplo n.º 3
0
        public static Dictionary <FullBodyBipedEffector, IKEffector> GetEffectors(CharBody actor)
        {
            Dictionary <FullBodyBipedEffector, IKEffector> dict = new Dictionary <FullBodyBipedEffector, IKEffector>();

            // main game does not have ik set......................................
            Logger.Info("actor ik={0}", actor.getIK());
            dict.Add(FullBodyBipedEffector.LeftHand, actor.getIK().solver.leftHandEffector);
            dict.Add(FullBodyBipedEffector.LeftShoulder, actor.getIK().solver.leftShoulderEffector);
            dict.Add(FullBodyBipedEffector.LeftThigh, actor.getIK().solver.leftThighEffector);
            dict.Add(FullBodyBipedEffector.LeftFoot, actor.getIK().solver.leftFootEffector);
            dict.Add(FullBodyBipedEffector.RightHand, actor.getIK().solver.rightHandEffector);
            dict.Add(FullBodyBipedEffector.RightShoulder, actor.getIK().solver.rightShoulderEffector);
            dict.Add(FullBodyBipedEffector.RightThigh, actor.getIK().solver.rightThighEffector);
            dict.Add(FullBodyBipedEffector.RightFoot, actor.getIK().solver.rightFootEffector);
            return(dict);
        }