//Calculates the target pose for the camera in order to appear in front of the marker.
    private Pose GetTargetPose(MarkerBehaviour marker)
    {
        Matrix4x4 m          = marker.GetMatrix();
        Matrix4x4 inverseMat = m.inverse;
        Pose      p          = new Pose();

        p.rotation  = ARucoUnityHelper.GetQuaternion(inverseMat);
        p.position  = marker.transform.position;
        p.position += ARucoUnityHelper.GetPosition(inverseMat);

        return(p);
    }
Exemple #2
0
 protected float GetMarkerDistanceFromCamera(MarkerBehaviour m)
 {
     return(ARucoUnityHelper.GetPosition(m.GetMatrix()).magnitude);
 }