stringgetAnalogCallback(
)

Returns a name of the world script callback function that receives data about input device sticks.
The callback function should be defined in the world script and receive 1 argument - an instance of the VrpnAnalogDevice class.

Source code (UnigineScript)

void callback_func(VrpnAnalogDevice device) {
// function logic
}

Return value

Callback function name.

doublegetChannel(
intchannel
)

Returns data received by the analog stick with the given number.

Notice

If the given stick haven't received data, the engine assertion will occur.

Arguments

intchannel - Analog stick number in range [0;number_of_sticks - 1].

Return value

Returns data received by the analog stick with the given number.

intgetNumChannels(
)

Returns the number of analog sticks that have received data.

Return value

The number of analog sticks that have received data. If no sticks have received data, 0 will be returned.

voidupdate(
)

Updates the internal state of the device and receives input data.

Notice

This function should be called each frame.

VrpnAnalogDevice(
stringname
)

Constructor.

Arguments

stringname - Path to the device in the format device_name@server_address.