Immerseum SDK: VR Simulator (version: RC-1.0.0)
       [view as Desktop | Tablet | Mobile]
getAxisValueSource Method
Example 

An array of InputAxis objects.

Be careful! The axis list properties in the InputAction object are all stored as Lists. Therefore, be sure to convert them to Arrays before passing them to this method using the <axis-list>.ToArray() method.

Returns the type of input device from which the axis value is being returned.

Best Practice
When an InputAction axis has multiple Input Axes defined, the ImmerseumSDK always returns the axis value with the highest value or greatest magnitude.
Syntax
public InputType getAxisValueSource( 
   params InputAxis[] axisArray
)

Parameters

axisArray

An array of InputAxis objects.

Be careful! The axis list properties in the InputAction object are all stored as Lists. Therefore, be sure to convert them to Arrays before passing them to this method using the <axis-list>.ToArray() method.

Return Value

Returns the InputType of the device from which the axis value was returned. Returns one of the following values:

  • InputType.Keyboard
  • InputType.Mouse
  • InputType.Oculus
  • InputType.SteamVR
  • InputType.Gamepad
  • InputType.None
Example
Returns the InputType from which the Right Trigger is being captured, and from which the X-Axis is being captured.
InputType xAxisSource = getAxisValue(xAxisList.ToArray());
 
InputType rightTriggerSource = getAxisValue(rightTriggerAxisList.ToArray());
See Also

Reference

InputAction Class
InputAction Members

 

 


Copyright (c) 2016-2017 Immerseum Inc. All rights reserved.

Send Feedback