IInputService
Input Service
Interface
Service for handling all input related functionality.
To use this service, you must first call StartAvatarInputCapture
,
StartVehicleInputCapture
, or StartCompleteCustomInputCapture
.
These methods will start capturing input and calling the listener methods when an overridden input event occurs.
Methods
PlayVibration(float, float, float) | Activates vibration with the given frequency, amplitude and duration. (VR and mobile only) |
ReleaseInputCapture(IInputActionsListener) | Releases input capture for the given listener. |
SetEmoteBindingsEnabled(bool) | Enable/disable being able to play emotes from keyboard keys or controller button bindings. Enabled by default. |
StartAvatarInputCapture(bool, bool, bool, bool, IAvatarInputActionsListener) | Starts overriding input for the avatar. |
StartCompleteCustomInputCapture(IInputActionsListener) | Disables default Spatial player input including camera control and mobile on-screen controls |
StartVehicleInputCapture(VehicleInputFlags, Sprite, Sprite, IVehicleInputActionsListener) | Sets the input capture for the vehicle. |
Events
onInputCaptureStarted | Event fired when input capture has started. |
onInputCaptureStopped | Event fired when input capture has stopped. |