Table des matières

AKRESULT __cdecl AK::MotionEngine::AddPlayerMotionDevice ( AkUInt8  in_iPlayerID,
AkUInt32  in_iCompanyID,
AkUInt32  in_iDeviceID,
void *  in_pDevice = NULL  

Connects a motion device to a player. Call this function from your game to tell the motion engine that a player is using the specified device.

  • AK_Success if the initialization was successful
  • AK_Fail if the device could not be initialized. Usually this means the drivers are not installed.
See also:
in_iPlayerID  Player number, must be between 0 and 3. See platform-specific documentation for more details.
in_iCompanyID  Company ID providing support for the device
in_iDeviceID  Device ID, must be one of the currently supported devices.
in_pDevice  PS4: PS4 Device handle, returned by scePadOpen. Windows: Windows Direct Input Device reference for DirectInput. NULL to use XInput. WiiU: Use AK_MOTION_WIIMOTE_DEVICE to add a Wiimote or AK_MOTION_DRC_DEVICE to add a DRC device. XboxOne: Use IGamepad::Id. > Keep NULL for all other platforms.