Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UGameViewportClient
Description
Allow the viewport-client to process a motion event received by the viewport. If the viewport-client uses the event, it should return true. If true is returned, the viewport should not bubble the event.
Virtual Inheritance
- FViewportClient::InputMotion → UGameViewportClient::InputMotion
| Name | InputMotion |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/GameViewportClient.h |
| Include Path | #include "Engine/GameViewportClient.h" |
| Source | /Engine/Source/Runtime/Engine/Private/GameViewportClient.cpp |
virtual bool InputMotion
(
FViewport * Viewport,
const FInputDeviceId DeviceId,
const FVector & Tilt,
const FVector & RotationRate,
const FVector & Gravity,
const FVector & Acceleration,
const uint64 Timestamp
)
True to consume the motion event, false to pass it on.
Parameters
| Name | Remarks |
|---|---|
| Viewport | The viewport that received the event (is focused by the owner of the accelerometer). |
| DeviceId | The input device that was moved. |
| Tilt | The current orientation of the device. |
| RotationRate | How fast the tilt is changing. |
| Gravity | Describes the current gravity of the device. |
| Acceleration | Describes the acceleration of the device. |
| Timestamp | The timestamp of when this input event was originally polled in the form of CPU cycles. |