Is it possible to get the object origin when Models is detected?

105 Views Asked by At

Question regarding Azure Object Anchors:

Once a model has been converted, and detected back in an app. Is it possible to get the original object origin? Example (see pictures below) here are two exact same glb, but the origin are different:

Origin at the center of the volume

second the whole mesh is translated

Another way to put it would be when the model is converted to the .ou file, does it do some transformation to optimize the model and then the origin is changed?


Setup:

  • UWP
  • Unity 2019.4.38f
  • AOA 0.22.0

Here are the thing I checked playing with the MRTK sample provided:

  • TrackObject.LogicalCenter
  • TrackObject.TrackedObjectState.Localtion

Both seems to return the same position in Unity World Space for both models. So the description of the LogicalCenter confused me a bit:

The object geometry isn't necessarily centered in the objects bounding box.
As a consequence we must take care that other visualizations intended to be placed relatively to a detected object can be placed as expected.
1

There are 1 best solutions below

1
On

Yes - this transform is available via the ObjectModel.OriginToCenterTransform property.