Tracking's rotation and position

Is there a way to check the tracking’s position and rotation? I know there is the phone’s accelerometer, but I want to move the tracking image, not the phone.

1 Like

Hi @marcus,

The tracking image in Studio represents the real-world target that the content is relative to. As such, there aren’t any rotation/position coordinates to return, as the actual target is found in real-world space.

I’m not quite sure I understand the use case, apologies. Could you elaborate on what it is you’re looking to achieve in this scenario please?

Thanks,
Seb

1 Like

Could you elaborate on what it is you’re looking to achieve in this scenario please?

It’s a balance game. The difference is that the client is not balancing the phone. Rather, it’s the tracking image that he moves to balance a 3d object on top of it.

1 Like

@marcus
Sounds like you’re looking for rotation and position of the camera from target.

Steve

Hey @marcus,

Studio doesn’t support physics so currently there’s no simple way to implement this functionality, unfortunately.

In theory, you may be able to simulate this by emitting a raycaster from the centre of the tracking image, which is then caught by a sphere within an attitude orient (to ensure the sphere is always upright).

You’d then use the intersection point on the sphere to determine the direction and speed that the ball should move in, as the ball will travel in a direction that is at a 90-degree angle to the intersection point, with the speed being determined by the value of the z-axis coordinate i.e. the lower the value, the more ‘tilted’ we can assume the tracking image is, therefore the ball should travel faster.

Hope this helps. If you get a chance to test this out, let us know how it goes.

All the best,
Seb

4 Likes