Hello! I’ve observed some unusual behavior related to devicePosition.
I wrote some code to retrieve devicePosition and deviceRotation, and checked their values. On the editor, everything seemed normal, with the return values appearing as though objects were being detected through Raycast. However, on the simulator, it returned exaggerated values, such as approximately (350, -1300, -700).
Below is a snippet of the actual code:
string str = string.Empty;
for (int i = 0; i < Touch.activeTouches.Count; i++)
{
var state = EnhancedSpatialPointerSupport.GetPointerState(Touch.activeTouches[i]);
str += $"pos:{state.devicePosition:F2}\nrotate:{state.deviceRotation:F2}\n\n";
}
tmpText.text = str;
Would it work correctly on an actual device? (Is this issue limited to the simulator?)
Or am I misunderstanding something?