C#
1void AddObjectAnchor(ARObjectAnchor arObjectAnchor) 2 { 3 Debug.Log ("object anchor added"); 4 if (arObjectAnchor.referenceObjectName == referenceObjectAsset.objectName) { 5 Vector3 position = UnityARMatrixOps.GetPosition (arObjectAnchor.transform); 6 //ARObjectAnchorからpositionを取得する 7 Quaternion rotation = UnityARMatrixOps.GetRotation (arObjectAnchor.transform); 8 //ARObjectAnchorからrotationを取得する 9 10 objectAnchorGO = Instantiate<GameObject> (prefabToGenerate, position, rotation); 11 }
上記のような形で対象のオブジェクトのpositionとrotation取得しており、
対象のオブジェクトと同じ場所に新しいオブジェクトが生成されます。
生成したオブジェクトの角度を変更する場合はどこを変更すれば良いのでしょうか。。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。