Log in or register to post comments

how to show text in imagetarget samples

July 18, 2012 - 3:01am #1

how to show text in imagetarget samples.every marker have a different info text.image target not show teapot only a info text.anyone can help?

how to show text in imagetarget samples

February 28, 2018 - 10:02am #11

Hi, i need to print my application.persistentdatapath in the screen, i work with odg r7 glasses, and i need to see the path in the screen to check my problem. How can i do that?

thank you.

how to show text in imagetarget samples

February 19, 2018 - 10:28pm #10

Hello, Can you please update the link on how to show a toast or text on camera screen itself and not on the imagetarget? What I mean is that the text or the toast must appear on the camera screen and not on the imagetarget itself. Like if I point the camera on the wrong imagetarget it will say "Error" then when I point the camera to the correct imagetarget then the corresponding 3DModel for that imagetarget would pop up appearing on the top of the imagetarget on real world. The only thing that I wanted to know is that can you show a toast/text on camera screen if you point the camera on the wrong imagetarget.

how to show text in imagetarget samples

February 19, 2018 - 10:20pm #9

Hello there! The link is not working. Can you please give or update the link on how to show a toast or text when the ARCamera detects an imagetarget. Thanks!

how to show text in imagetarget samples

March 6, 2013 - 10:58am #8

Hi benzlocke,

could you post this in a new Thread in Unity section of the Forum please (as that is the most appropriate place for Unity related issues):

https://developer.vuforia.com/forum/ar-technical-discussion/unity-3-extension-technical-discussion

Thanks.

 

how to show text in imagetarget samples

March 5, 2013 - 10:58pm #7

Excuse me, Could i ask you some question?  In Vuforia developer , there is a following example:

Drag an AR Object on Screen with Your Finger.

I copy the c# code and lace this code on the AR Camera, add mesh collider  to  target object ( actually, i am not sure the "target object" is the tepot or image target(prefabs), then run the apk, Notmatter how i drag the teapot(AR Object) , it is not response~~ 

Can you tell me which steps i miss? 

My english is poor, i am very sorry~~~

how to show text in imagetarget samples

July 19, 2012 - 7:53pm #6

im not using unity extension.cause it not free.im using native android.thnks

how to show text in imagetarget samples

July 19, 2012 - 5:27pm #5

Hello,

Here is sample code to detect a touch and drag event on an object with a mesh colider.


using UnityEngine;
using System.Collections;

public class DragObject : MonoBehaviour {
	
	public GUIText message = null;
	
	private Transform pickedObject = null;
	private Vector3 lastPlanePoint;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		
		Plane targetPlane = new Plane(transform.up, transform.position);
		
		//message.text = "";
		
		foreach (Touch touch in Input.touches) {
			
			
			//Gets the ray at position where the screen is touched
			Ray ray = Camera.main.ScreenPointToRay(touch.position);
			
			//Gets the position of ray along plane
			float dist = 0.0f;
			//Intersects ray with the plane. Sets dist to distance along the ray where intersects
			targetPlane.Raycast(ray, out dist);
			//Returns point dist along the ray.
			Vector3 planePoint = ray.GetPoint(dist);
			//Debug.Log("Point=" + planePoint);
			
			//True if finger touch began. If ray intersects collider, set pickedObject to transform of collider object
			if (touch.phase == TouchPhase.Began) {
				//Struct used to get info back from a raycast
				RaycastHit hit = new RaycastHit();
				if (Physics.Raycast(ray, out hit, 1000)) { //True when Ray intersects colider. If true, hit contains additional info about where collider was hit
					pickedObject = hit.transform;
					lastPlanePoint = planePoint;
				} else {
					pickedObject = null;
				}
			
			//Move Object when finger moves after object selected.
			} else if (touch.phase == TouchPhase.Moved) {
				if (pickedObject != null) {
					pickedObject.position += planePoint - lastPlanePoint;
					lastPlanePoint = planePoint;
				}
			
			//Set pickedObject to null after touch ends.
			} else if (touch.phase == TouchPhase.Ended) {
				pickedObject = null;
			}
		}
	}
}

how to show text in imagetarget samples

July 19, 2012 - 4:56pm #4

Hello,

This thread may help you. Here you will find the code to display a Toast when a marker is found.

https://ar.qualcomm.at/content/changing-action-after-recognized-tracker

Thank you,

-Peter

how to show text in imagetarget samples

July 19, 2012 - 3:52am #3

yes.but i can't understand....i'm very newbie.can you give me some examples?

how to show text in imagetarget samples

July 18, 2012 - 6:45pm #2

Pls see my response to your other post on this question. There are a variety of approaches depending on your requirements.

Log in or register to post comments