Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help / Missing documentation about Detected Object Position #35

Open
Merichbier opened this issue Jun 22, 2022 · 3 comments
Open

Help / Missing documentation about Detected Object Position #35

Merichbier opened this issue Jun 22, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@Merichbier
Copy link

Source : https://stackoverflow.com/questions/72705226/is-it-possible-to-get-the-object-origin-when-models-is-detected

Just repeating it here to be sure it get not forgotten.

When we have two geometrically identical model but with different origin.
Is it possible to get this origin back once the model is detected ?

Example :
sofa-center
sofa-offset

I played a bit with the MRTK samples and showed a sphere at different position I could retrieve from the TrackedObject class :

  • TrackObject.LogicalCenter
  • TrackObject.TrackedObjectState.Location

Both seems to return the same position in Unity World Space for both models (bounding box center).
So the description of the LogicalCenter confuse me a bit :

The object geometry isn't necessarily centered in the objects bounding box
As a consequence we must take care that other visualziations intended to be placed re

It would be good to state somewhere in the documentation what the Location of the detected object represents and if converting a model does apply any transformation on the model.

@craigktreasure craigktreasure added the documentation Improvements or additions to documentation label Jun 22, 2022
@craigktreasure
Copy link
Contributor

Thanks for the feedback and I agree. I've filed an internal work item (40132604) to track this, and we'll see if we can get something added to our docs.

@dfields-msft
Copy link

The short answer is yes - use the ObjectModel.OriginToCenterTransform property to relate origin-relative content to the center of the detected object instance.

@Merichbier
Copy link
Author

@dfields-msft Thanks a lot for the pointer :) I was able to easily get the model origin back ! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants