microsoft / MixedReality-WorldLockingTools-Unity

Unity tools to provide a stable coordinate system anchored to the physical world.
https://microsoft.github.io/MixedReality-WorldLockingTools-Unity/README.html
MIT License
188 stars 45 forks source link

Add sample for vehicle type configuration #267

Closed fast-slow-still closed 2 years ago

fast-slow-still commented 2 years ago

The Vehicle sample scene is a stripped down version of attaching a camera to a vehicle or platform.

As the root of the camera tree is moved through Unity's global coordinate space, the global coordinates of the camera are constantly changing. Naturally, this doesn't move the camera through physical space. The camera is moving through virtual space, but not through physical space.

Other things attached to the moving root also moving with the camera. From the camera's perspective, the other things moving with it (also attached to moving root) are stationary, and the stationary things in global space appear to be moving. So the things also attached to moving root can be thought of as parts of the vehicle in which the camera is riding. The things stationary in global space that are moving by are analogous to the scenery passing by the window of the vehicle.

This sample demonstrates two uses of SpacePins in such a context. SpacePins that are also part of this moving vehicle (also attached to moving root) operate as usual in the moving frame of the vehicle. They allow you to pin parts of the virtual vehicle space to the physical space. Although their coordinates are constantly changing (as the vehicle moves), they are fixed in the frame of the vehicle which contains the camera.

The second usage is to attach a coordinate frame outside the moving root's frame to the physical world. Once it is pinned to the physical world, its coordinates will be constantly updated to keep it stationary relative to the physical world, which keeps everything attached to it stationary relative to the physical environment.

fast-slow-still commented 2 years ago

/azp run

azure-pipelines[bot] commented 2 years ago
Azure Pipelines successfully started running 2 pipeline(s).
fast-slow-still commented 2 years ago

/azp run

azure-pipelines[bot] commented 2 years ago
Azure Pipelines successfully started running 2 pipeline(s).