With another attempt of activating the game object, I tested to attach a positional input for individual image targets. This is to define the coordinates of each image targets by pixels when it is tracked.
I have named the script as TargetScreenCoords. The need of void start is used for initialization, and to retrieve the ImageTargetBehaviour component I used GetComponent. It should be noted that this only works if this script is attached to an Image Target. If the mImageTargetBehaviour is not found a log in the Console area will state “ImageTargetBehaviour is not found“. An update is called once per frame. Using the bottom-left corner of the target as an example would require to define a point in the target local reference. The target reference plane in Unity is X-Z, while Y is the normal direction to the target plane. We then need to convert the local point to the world coordinates. The world coordinates will then be projected to screen coordinates in pixel per frame
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Vuforia;
public class TargetScreenCoords : MonoBehaviour
{
private ImageTargetBehaviour mImageTargetBehaviour = null;
void Start() {
mImageTargetBehaviour = GetComponent<ImageTargetBehaviour>();
if (mImageTargetBehaviour == null)
{
Debug.Log ("ImageTargetBehaviour not found");
}
}
void Update () {
if (mImageTargetBehaviour == null)
{
Debug.Log ("ImageTargetBehaviour not found");
return;
}
Vector2 targetSize = mImageTargetBehaviour.GetSize();
float targetAspect = targetSize.x / targetSize.y;
Vector3 pointOnTarget = new Vector3(-0.5f, 0, -0.5f/targetAspect);
Vector3 targetPointInWorldRef = transform.TransformPoint(pointOnTarget);
Vector3 screenPoint = Camera.main.WorldToScreenPoint(targetPointInWorldRef);
Debug.Log ("target point in screen coords: " + screenPoint.x + ", " + screenPoint.y);
}
}
The results will come out as the image below. Since the log will be updated every 1 second, the console will definitely be bombarded with screen coords.

However, adding this screen coord I was unable to implement it as there are no existing forums that provides features that could insert certain positions of an individual game object.