Immerseum SDK: VR Simulator (version: BETA-0.9)
       [view as Desktop | Tablet | Mobile]
moveController(Int32,Vector3,Quaternion) Method
Example 
The controller to instantiate. Accepts either 0 for left-hand or 1 for right-hand.
A Vector3 of the coordinates by which each of the controller's three axes should be offset (moved).
A Quaternion of the rotation to which the controller should be rotated.
Moves the controller to the targetPosition and adjusts its rotation to targetRotation.
Syntax
public static void moveController( 
   int controller,
   UnityEngine.Vector3 targetPosition,
   UnityEngine.Quaternion targetRotation
)

Parameters

controller
The controller to instantiate. Accepts either 0 for left-hand or 1 for right-hand.
targetPosition
A Vector3 of the coordinates by which each of the controller's three axes should be offset (moved).
targetRotation
A Quaternion of the rotation to which the controller should be rotated.
Remarks
Fires the EventManager.OnMoveControllerStart_Vector event.
Example
Moves the right-hand controller forward by 30cm (0.3m).
Debug.Log(HMDSimulator.leftController.position);
Vector3 moveOffset = new Vector3(0,0,0.3f);
 
ControllerManager.moveController(1, moveOffset);
 
Debug.Log(HMDSimulator.leftController.position);
// Outputs the same position as above, but with the Z-value increased by 0.3f.
See Also

Reference

ControllerManager Class
ControllerManager Members
Overload List

 

 


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

Send Feedback