IEnumerator AddARObject(GameObject model, string _id) { if (DataUtility.TrackingMode == ARTrackingMode.Markerless && !_kudanTracker.ArbiTrackIsTracking()) { DelayPlaceObject(); yield return(new WaitUntil(_kudanTracker.ArbiTrackIsTracking)); } try { GameObject target = Instantiate(model); objlist.Add(target); ARProduct m = null; if (DataUtility.TrackingMode == ARTrackingMode.Marker) { m = DataUtility.InitARObject(target, markerTransform); } else { _kudanTracker.FloorPlaceGetPose(out trackPos, out trackRot); m = DataUtility.InitARObject(target, markerlessTransform); } if (m != null) { m.SKU = _id; SetCurrentObject(m); } } catch (System.Exception ex) { TestCenter.Singleton.Log("error: " + ex.Message); } }
public void StartClicked() { //debugText.text += "clicked "; if (!_kudanTracker.ArbiTrackIsTracking()) { Debug.Log("start clicked"); //debugText.text += "started tracking "; // from the floor placer. Vector3 floorPosition; // The current position in 3D space of the floor Quaternion floorOrientation; // The current orientation of the floor in 3D space, relative to the device _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation); // Starts markerless tracking based upon the given floor position and orientations spawnersPlaced++; gameContent.Init(); } else { //debugText.text += "already tracking "; } //else //{ // _kudanTracker.ArbiTrackStop(); //} }
public void StartClicked() { // from the floor placer. Vector3 floorPosition; // The current position in 3D space of the floor Quaternion floorOrientation; // The current orientation of the floor in 3D space, relative to the device _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation); // Starts markerless tracking based upon the given floor position and orientations }
// ReSharper disable once UnusedMember.Local private void Awake() { Vector3 position; Quaternion orientation; KudanTracker = FindObjectOfType <KudanTracker>(); KudanTracker.FloorPlaceGetPose(out position, out orientation); KudanTracker.ArbiTrackStart(position, orientation); }
public void StartClicked() { // from the floor placer. Vector3 floorPosition; Quaternion floorOrientation; _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation); }
void SpawnLancekun() { Vector3 floor_position; Quaternion floor_orientation; kudan_tracker_.FloorPlaceGetPose(out floor_position, out floor_orientation); kudan_tracker_.ArbiTrackStart(floor_position, floor_orientation); obj_lance_mon_.gameObject.SetActive(true); }
IEnumerable Start() { // 1초간 대기 시킴 yield return(new WaitForSeconds(1.0f)); // 바닥의 위치 값과 바닥의 회전 값을 저장할 변수 선언. Quaternion(사원수) Vector3 floor_position; Quaternion floor_orientation; // 현재 바닥의 위치와 방위 값을 얻어옴 kudan_tracker_.FloorPlaceGetPose(out floor_position, out floor_orientation); // 얻어온 값을 이용하여 트래킹 시작함 kudan_tracker_.ArbiTrackStart(floor_position, floor_orientation); }
public void MarkerlessStartTapped() { if (!_kudanTracker.ArbiTrackIsTracking()) { Vector3 floorPosition; Quaternion floorOrientation; _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation); } else { _kudanTracker.ArbiTrackStop(); } }
public void SetActiveArbiTrack(bool b) { if (b) { // from the floor placer. Vector3 floorPosition; // The current position in 3D space of the floor Quaternion floorOrientation; // The current orientation of the floor in 3D space, relative to the device _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); // Gets the position and orientation of the floor and assigns the referenced Vector3 and Quaternion those values _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation); // Starts markerless tracking based upon the given floor position and orientations m_eggSearcher.StartSearching(); } else { _kudanTracker.ArbiTrackStop(); m_eggSearcher.StopSearching(); } }
// Update is called once per frame void Update() { driverText.text = driver.localPosition + " ; " + driver.localRotation; markerlessText.text = markerless.transform.localPosition + " ; " + markerless.transform.localRotation; fullposText.text = driver.position + " ; " + markerless.transform.position; _kudan.ArbiTrackGetPose(out pos1, out rot1); _kudan.FloorPlaceGetPose(out pos2, out rot2); arbiText.text = pos1 + " ; " + rot1; floorText.text = pos2 + " ; " + rot2; childStr = ""; for (int i = 1; i < markerless.transform.childCount; i++) { tran = markerless.transform.GetChild(i); if (tran != null) { childStr += tran.name + " : " + tran.localPosition + " , " + tran.localScale + " ; "; } } childrenText.text = childStr; }
public void MarkerlessStartTapped() { if (!_kudanTracker.ArbiTrackIsTracking()) { Vector3 floorPosition; Quaternion floorOrientation; _kudanTracker.FloorPlaceGetPose(out floorPosition, out floorOrientation); _kudanTracker.ArbiTrackStart(floorPosition, floorOrientation); markerlessStartButton.image.color = Color.red; markerlessStartText.text = "stop"; selectButton.interactable = false; } else { _kudanTracker.ArbiTrackStop(); markerlessStartButton.image.color = Color.white; markerlessStartText.text = "start"; selectButton.interactable = true; } }