Example #1
0
 void HandleController()
 {
     if (BaseController != null)
     {
         BaseSpeed = BaseController.GetSpeed();
         if (BaseSpeed.x < 0)
         {
             BaseSpeed.x *= 0.1f;
         }
         BaseRotation = BaseController.GetRotation();
     }
     if (HeadController != null)
     {
         HeadController.GetHeadOrientation(out HeadOrientation, false);
         HeadController.GetHeadPosition(out HeadPosition, false);
     }
 }
Example #2
0
    void HandleController()
    {
        if (BaseController != null)
        {
            /*	BaseSpeed = BaseController.GetSpeed ();
             *      if (BaseSpeed.x < 0)
             *              BaseSpeed.x *= 0.1f;
             *      BaseRotation = BaseController.GetRotation ();*/
        }
        if (HeadController != null)
        {
            Vector3    pos;
            Quaternion rot;
            HeadController.GetHeadOrientation(out rot, false);
            HeadController.GetHeadPosition(out pos, false);

            BodyJoints.Head.Rotation = rot;
            BodyJoints.Head.Position = pos;
        }
    }