Tool does not attach when camera is on the left side

@ben When the camera is on the right side of the phone, the tool attaches in the right way to an object. However if the camera is on the left side of a phone, it does not attach rightfully. Once you flip the phone two times it corrects.

This must have to do with the projectionMatrix corrections I make when the phone flips upside down. I’ll check it out.

1 Like

Welcome @ben to the forum! :slight_smile:

1 Like

Happy to be here!

Do you experience different behavior than in this video? I am able to add tools to an (image target) object with the phone flipped in either direction:
add-tools-flipped-upside-down.2020-03-11 11_50_50

The matrices are not flipped when you open the toolbox with the camera on the right side. It only happens if you start the app with the camera on the right side. If you start with the camera on the left side and then flip its ok.

Oh yeah that is true. I can reproduce the bug now. I’ll look into a solution.

@valentin I made a pull request with the solution https://github.com/ptcrealitylab/vuforia-spatial-toolbox-userinterface/pull/78

The problem was that the setProjectionMatrix function was getting called after the initial orientation event flipped the projection matrix upside down, so it was overwriting the flipped value with an unflipped one.

Perfect! Reviewed and merged. Will add it to the next TestFlight review

1 Like