PokePointer.IMixedRealityNearPointer.TryGetDistanceToNearestSurface Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Near pointers often interact with surfaces.
This method provides a mechanism to get the distance to the closest surface the near pointer is interacting with.
C++
virtual bool Microsoft.MixedReality.Toolkit.Input.IMixedRealityNearPointer.TryGetDistanceToNearestSurface([Runtime::InteropServices::Out] float % distance) = Microsoft::MixedReality::Toolkit::Input::IMixedRealityNearPointer::TryGetDistanceToNearestSurface;
bool IMixedRealityNearPointer.TryGetDistanceToNearestSurface (out float distance);
abstract member Microsoft.MixedReality.Toolkit.Input.IMixedRealityNearPointer.TryGetDistanceToNearestSurface : single -> bool
override this.Microsoft.MixedReality.Toolkit.Input.IMixedRealityNearPointer.TryGetDistanceToNearestSurface : single -> bool
Function TryGetDistanceToNearestSurface (ByRef distance As Single) As Boolean Implements IMixedRealityNearPointer.TryGetDistanceToNearestSurface
- distance
- Single
Out parameter filled with the distance along the surface normal from the surface to the pointer if available, otherwise 0.0f.
True if a distance was retrieved, false if not.
Producto | Versiones |
---|---|
MRTK2 Unity 2018 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0 |
MRTK2 Unity 2019 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |
MRTK2 Unity 2020 | 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |