Click or drag to resize

PhysicsExtensionsGetClosest Method (Transform, Vector3, Single)

Gets the closest transform and distance to the position specified

Namespace:  ImmerseSDK.Extensions
Assembly:  ImmerseSDK.App (in ImmerseSDK.App.dll) Version: 3.9.0.0 (3.9.0.0)
Syntax
C#
public static UnityEngine.Transform GetClosest(
	this UnityEngine.Transform[] targets,
	UnityEngine.Vector3 position,
	out float closest
)

Parameters

targets
Type: UnityEngine.Transform
transforms to check
position
Type: UnityEngine.Vector3
position to use
closest
Type: SystemSingle
the smallest distance

Return Value

Type: UnityEngine.Transform

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also