Immerseum SDK: VR Simulator (version: BETA-0.9)
       [view as Desktop | Tablet | Mobile]
moveController(Int32,Vector3,Quaternion,Boolean) Method
Example 
Integer which identifies which simulated controller being moved. Accepts 0 for the left-hand controller, and 1 for the right-hand controller.
The coordinates by which the controller's position should be offset/adjusted, expressed as a Vector3.
The rotation that the controller should have when the move has been completed, expressed as a Quaternion.
If true, moves the controller to the targetOffset relative to the origin point at (0, 0, 0) in local space.

Fires the OnMoveControllerStart_Vector event.

Be Aware Be Aware

Listeners are expected to have a return type of void and to accept the same parameters as this method (see below).

Syntax
public static void moveController( 
   int controller,
   UnityEngine.Vector3 targetOffset,
   UnityEngine.Quaternion targetRotation,
   bool relativeToOrigin
)

Parameters

controller
Integer which identifies which simulated controller being moved. Accepts 0 for the left-hand controller, and 1 for the right-hand controller.
targetOffset
The coordinates by which the controller's position should be offset/adjusted, expressed as a Vector3.
targetRotation
The rotation that the controller should have when the move has been completed, expressed as a Quaternion.
relativeToOrigin
If true, moves the controller to the targetOffset relative to the origin point at (0, 0, 0) in local space.
Example
// Fires the OnMoveControllerStart_Vector event, moving the left-hand controller 
// forward by 0.5 and upward by 0.25.
EventManager.moveController(0, new Vector3(0f, 0.5f, 0.25f), HMDSimulator.leftController.rotation, false);
See Also

Reference

EventManager Class
EventManager Members
Overload List

 

 


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

Send Feedback