How can I prevent the Bounding Box from jumping around?


Our users have complaints that the bounding box jumps around when they try to focus on a hovering item. I’m presuming the reason why the box jumps is because it’s in “table top” mode and is misidentifying or jumping between what it identifies as the table.

I’d like to turn this off and just have the bounding box appear in the middle of the view X meters in front of the camera. In the Scanner sample app, if I try to change the pose initializer strategy from STCameraPoseInitializerStrategyTableTopCube to STCameraPoseInitializerStrategyGravityAlignedAtOrigin (or the other one), it shoves the box right up on the camera and to the right.

And I can’t figure out for the life of me how to move/translate it forward and in the center. Can anyone help give me a hint of what to look for?



Though I do not know the specific solution to your problem, I can possibly offer tips to get you to a solution.

Both, STCameraPoseInitializerStrategyGravityAlignedAtOrigin and STCameraPoseInitializerStrategyGravityAlignedAtVolumeCenter need a gravity vector. Are you sure you are using the correct gravity vector when using those constants?

Also, have you seen the function -updateCameraPoseWithGravity:depthFrame:error: under the STCameraPoseInitializer class? Maybe it can help?

Let me know what you come up with!


I am definitely not using a gravity vector. I’m not much of a 3D or Structure developer, so it’s all new to me.



Check out this thread: