/// <summary>
 /// Create a motion generator
 /// </summary>
 /// <returns>Motion generator</returns>
 public static MotionGenerator CreateMotionGenerator()
 {
     using (var faceS = ResourceManager.GetStream(ResourceKey.FacialMotion))
         using (var headS = ResourceManager.GetStream(ResourceKey.HeadRotation))
             using (var visemeS = ResourceManager.GetStream(ResourceKey.Viseme))
                 using (var phoneS = ResourceManager.GetStream(ResourceKey.PhoneMapZhCN))
                 {
                     var generator = new MotionGenerator(faceS, headS, visemeS, phoneS);
                     return(generator);
                 }
 }
Esempio n. 2
0
    void Start()
    {
        // Configuration
        _config = new Configuration(gameObject.transform.localScale.x);
        // Character setup
        List<GameObject[]> body_list = new List<GameObject[]>();
        body_list.Add(arm_l);
        body_list.Add(arm_r);
        body_list.Add(body);
        List<GameObject[]> limbs_list = new List<GameObject[]>();
        limbs_list.Add(leg_l);
        limbs_list.Add(leg_r);
        _chara = new CharaConfiguration(_config, root.GetComponent<Rigidbody>(), body_list, limbs_list, debug);
        _motion_generator = new MotionGenerator(_chara, _config, debug);

        _desired_direction = Vector3.zero;

        /*
        if (debug)
            root.GetComponent<Rigidbody>().isKinematic = true;
            */
    }