Immerseum SDK: VR Simulator (version: BETA-0.9)
       [view as Desktop | Tablet | Mobile]
getDistance(Vector3,Vector3,Vector3,Boolean,Boolean) Method
The position in worldspace of the camera (user's head/eyes).
The position in worldspace of the left-hand controller.
The position in worldspace of the right-hand controller.
Determines whether the distance is returned as an unsigned (absolute) value. True by default.
Determines whether the distance should ignore differences in height between the points and the Play Area's bounds. True by default.
Returns the shortest distance from the Play Area's bounds to the user's avatar as defined by three points.
Syntax
public float getDistance( 
   UnityEngine.Vector3 cameraPosition,
   UnityEngine.Vector3 leftControllerPosition,
   UnityEngine.Vector3 rightControllerPosition,
   bool unsigned,
   bool ignoreHeight
)

Parameters

cameraPosition
The position in worldspace of the camera (user's head/eyes).
leftControllerPosition
The position in worldspace of the left-hand controller.
rightControllerPosition
The position in worldspace of the right-hand controller.
unsigned
Determines whether the distance is returned as an unsigned (absolute) value. True by default.
ignoreHeight
Determines whether the distance should ignore differences in height between the points and the Play Area's bounds. True by default.

Return Value

The distance expressed in worldspace units (equivalent to meters).
See Also

Reference

PlayArea Class
PlayArea Members
Overload List

 

 


Copyright (c) 2015 Immerseum Inc. All rights reserved.

Send Feedback