Ejemplo n.º 1
0
        public ArmMimic CreateArm(ArmMimic.ArmSide WhichSide, VRObjectMimic Tracker, VRObjectMimic Controller)
        {
            //Create an Arm Prefab
            ArmMimic newArm = GameObject.Instantiate <GameObject>(Resources.Load <GameObject>("Arm Mimic Prefab")).GetComponent <ArmMimic>();

            newArm.transform.SetParent(transform);

            //Initialize the arm prefab (handing in the side and connector points)
            newArm.Initialize(WhichSide, GetShoulder(WhichSide), Tracker, Controller);

            //Keep track of this as our Left/Right arm?
            AttachArmToOurBody(WhichSide, newArm);
            return(newArm);
        }