0

I am using Spark AR Studio. When I use gestures like tap or pan, I get the position in pixels on the screen. I want to be able to it the values in local coordinates, to know for example, if a 3D object is tapped.

For example, for the "iPhone 8" simulation within Spark AR I get:

Screen Scale: 2
Screen Size: 750, 1334

Spark AR uses X/Y coordinate system with the center point at 0,0.

Liron Harel
  • 10,819
  • 26
  • 118
  • 217

1 Answers1

2

for detecting if a 3D object is tapped, you can use a producer patch of your object with an patch "Object tap".

for converting the screen position to a canvas position, you can use this patch system below, it use the device patch so it should work with all device automatically :

enter image description here

deHaar
  • 17,687
  • 10
  • 38
  • 51