jbienzms / SpatialAlignment

Helpful components for aligning and keeping virtual objects aligned with the physical world.
MIT License
35 stars 5 forks source link

Add Vector-Based Alignment Option #7

Closed jbienzms closed 5 years ago

jbienzms commented 5 years ago

Vector-based alignment seems pretty easy to implement and would be quite helpful in aligning large-scale building holograms to the physical world.

Vector-based alignment works by specifying an origin and a direction. The origin and direction are specified on the model, then corresponding origin and direction are specified in the real world. The origins are aligned (via a simple Vector3 offset calculation) and the two directions are used to calculate a simple rotation around the origin.

This should be far easier to implement than a true segment-based alignment, since the length of the segment (scale) and differences in y values (pitch and roll) are completely ignored.

jbienzms commented 5 years ago

This issue was resolved with the merge of #8