Hi evereyone, now, i can show the button that user to call the empty function for duplicate the gmaeObject when the marker A is tracked. However, how can i write the duplicate function that it allows to duplicate function from markerA to markerB.
As i know, in unity, there are API for it, i have changed the XY position that used o duplicatie the gameObject in same markerA and shown the gameobject in debug log. However, it cannot show in runtime AR application.
http://docs.unity3d.com/Documentation/ScriptReference/Object.Instantiate.html
thanks
private void OnCollisionEnter(Collision collision)
{
rb.useGravity = false;
rb.constraints = RigidbodyConstraints.FreezeRotation;
rb.constraints = RigidbodyConstraints.FreezePosition;
collision.gameObject.transform.parent = GameObject.Find("ImageTarget").transform; // This line image target and collision object combine. Thus, non-moving object move direction of image target. TAG: stcik objects
Debug.Log("Collission detect.");
}
//Deniz BABAT