---
title: "Hubert (Sathaporn) Hu (@shubertkai) | Hashnode"
description: "Hubert (Sathaporn) Hu (@shubertkai) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@shubertkai"
---

@shubertkai

# Hubert (Sathaporn) Hu

@shubertkai · Joined January 2022

## Comments

[Shayne Kiekebosch, I found out that the pose still needs to be transformed though - so the matrix conversion is still useful.](https://hashnode.com/posts/qr-code-tracking-in-the-hololens/604a7f27ad1cac7d577dfa06/comment/61d9d782cda0d0294b696c38#reply-61df5d976bf5f0642b8f1452)

Reply · Article · Jan 12, 2022 · [QR Code tracking in the HoloLens](https://hashnode.com/posts/qr-code-tracking-in-the-hololens/604a7f27ad1cac7d577dfa06)

[Thanks Shayne, this code saved my project. The code is outdated though if you are using OpenXR. There's now a better way to compute the QR Code's pose. For QRCodeInformation, I'm adding another field called "SpatialGraphNodeID": public class QRCodeInformation { public string Data { get; set; } public float Length { get; set; } #if WINDOWS\_UWP public SpatialCoordinateSystem QRSpatialCoordinateSystem { get; set; } public Guid SpatialGraphNodeID { get; set; } public QRCodeInformation(string data, SpatialCoordinateSystem qrSpatialCoordinateSystem, float length, Guid spatialGraphNodeID) { Data = data; Length = length; QRSpatialCoordinateSystem = qrSpatialCoordinateSystem; SpatialGraphNodeID = spatialGraphNodeID; } #endif public QRCodeInformation() { } } I had to change some code to match the new constructor's signature. Then, to find the pose, I use this code instead: SpatialGraphNode node = SpatialGraphNode.FromStaticNodeId(SpatialGraphNodeID); Pose pose; if (node != null && node.TryLocate(FrameTime.OnUpdate, out pose)) { if (CameraCache.Main.transform.parent != null) { pose = pose.GetTransformedBy(CameraCache.Main.transform.parent); } marker.transform.SetPositionAndRotation(pose.position, pose.rotation); } This snippet is from: Microsoft' QR Source Code I hate making public posts very much. However, I think this would be a very good PSA for anyone who's about to go Kylo Ren on their equipment. PS: I could clean up your code to remove any WinRT reference too, but I just have no fight left at the moment.](https://hashnode.com/posts/qr-code-tracking-in-the-hololens/604a7f27ad1cac7d577dfa06/comment/61d9d782cda0d0294b696c38)

Comment · Article · Jan 8, 2022 · [QR Code tracking in the HoloLens](https://hashnode.com/posts/qr-code-tracking-in-the-hololens/604a7f27ad1cac7d577dfa06)
