Log in or register to post comments

Get vumark position and rotation

February 1, 2017 - 7:53am #1

Hello, I am using Vumarks in a Unity application.

 

When I see a Vumark on camera I need the coordinates of the Vumark and its rotation. Is it possible to get those with the Unity API?

Get vumark position and rotation

May 29, 2017 - 6:42pm #7

Hello, seems a good solution for Unity. Is there any way without Unity only with the Android SDK? I can't find any way in the VuMarkRenderer to get the rotation for the Marker. Or maybe any idea where i can try to get it? Do i have to decompose the modelViewMatrix_Vuforia?

 

I'm sorry got it... it is in the Pose Matrix.

Get vumark position and rotation

February 2, 2017 - 5:34am #6

I dont know but i would give it a try

Get vumark position and rotation

February 2, 2017 - 3:44am #5

I tested it in play mode. Do you think it will be different on a device?

Get vumark position and rotation

February 2, 2017 - 1:29am #4

Did you test it in play mode or on a device?

Get vumark position and rotation

February 2, 2017 - 12:59am #3

Thank you for the answer, but the position and rotation of the behaviors is always (0,0,0) and (0,0,0,1)

Get vumark position and rotation

February 1, 2017 - 1:06pm #2

You can get the position and rotation of the marker from the active behaviours of the vumarkTracker.

See the snippet below. It is a smal extraction from the Vumark sample.

public class VuMarkHandler: MonoBehaviour
{

   private VuMarkManager vuMarkManager;
   void start()
   {
      vuMarkManager = TrackerManager.Instance.GetStateManager().GetVuMarkManager();
   }

   void Update()
   {
      foreach(var bhvr in vuMarkManager.GetActiveBehaviours())
      {
         var position = bhvr.transform.position;
         var rotation = bhvr.transform.rotation;
         //hard work goes here
      }
   }
}

 

 

Log in or register to post comments