ssCore.Joystick.setThreshold

Set the threshold value that determines if the stick has moved.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

threshold - [Optional] - The threshold value for which a change on an axis is deemed to be a movement. Default value is 500.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Joystick.setThreshold( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Joystick.setThreshold( paramsObject );


Notes:

Many joysticks have a natural tendency to generate noise, resulting in a constant fluctuation in the apparent joystick position, even though it is not being moved. To compensate for this, the threshold value is used to reject miniscule changes in the position readings, effectively dampening noise.

                

Examples:

ssCore.Joystick.setThreshold({threshold:750});