Navigation
API > API/Editor > API/Editor/VREditor
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UViewportInteractor
- UVREditorInteractor
- UVRScoutingInteractor
References
| Module | VREditor |
| Header | /Engine/Source/Editor/VREditor/Public/VREditorInteractor.h |
| Include | #include "VREditorInteractor.h" |
Syntax
class UVREditorInteractor : public UViewportInteractor
Remarks
VREditor default interactor
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bFlickActionExecuted | Whether a flick action was executed | |
| bool | bForceShowLaser | Forcing to show laser | |
| bool | bHasTriggerBeenReleasedSinceLastPress | True if trigger has been fully released since the last press | |
| bool | bIsScrubbingSequence | Whether or not this controller is being used to scrub sequencer | |
| bool[2] | bIsTrackpadPositionValid | True if we have a valid trackpad position (for each axis) | |
| bool | bIsTriggerFullyPressed | Trigger axis stateTrue if trigger is fully pressed right now (or within some small threshold) | |
| bool | bIsTriggerPressed | True if the trigger is currently pulled far enough that we consider it in a "half pressed" state | |
| bool | bIsUndoRedoSwipeEnabled | Whether swiping left/right on touchpad/joystick triggers undo/redo | |
| bool | bWantHelpLabels | True if we want help labels to be visible right now, otherwise false | |
| FName | ControllerMotionSource | HelpRight or left hand | |
| TOptional< FLinearColor > | ForceLaserColor | The color that will be used for one frame | |
| FVector3d | HandMeshBaseScale | ||
| TObjectPtr< class UStaticMeshComponent > | HandMeshComponent | GraphicsAccess to the current handmesh. | |
| FTransform | HandMeshGripTransform | ||
| TMap< FKey, class AFloatingText * > | HelpLabels | Help labels for buttons on the motion controllers | |
| FTimespan | HelpLabelShowOrHideStartTime | Time that we either started showing or hiding help labels (for fade transitions) | |
| FVector2D | InitialTouchPosition | SwipeInitial position when starting to touch the trackpad | |
| TObjectPtr< class UMotionControllerComponent > | LaserMotionControllerComponent | Separate motion controller component set to the "aim" pose motion source, used for the laser pointer. | |
| FTimespan | LastActiveTrackpadUpdateTime | Real time that the last trackpad position was over the dead zone threshold. | |
| ETouchSwipeDirection | LastSwipe | Latest swipe direction on the trackpad | |
| FVector2D | LastTrackpadPosition | Last position of the touched trackpad | |
| FTimespan | LastTrackpadPositionUpdateTime | Real time that the last trackpad position was last updated. Used to filter out stale previous data. | |
| TObjectPtr< class UMotionControllerComponent > | MotionControllerComponent | Motion controller component which handles late-frame transform updates of all parented sub-components | |
| FVector2D | TrackpadPosition | Position of the touched trackpad | |
| TObjectPtr< class UVREditorMode > | VRMode | The mode that owns this interactor |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FName | Sets the EControllerHand for this motioncontroller | ||
| EControllerHand | Get the side of the controller | ||
| EControllerType | Returns what controller type this is for asymmetric control schemes | ||
| FName | |||
| const TMap< FKey, FViewportActionKeyInput > & | Gets the key-to-action map (const) | ||
| TMap< FViewportActionKeyInput, TArray< FKey > > | GetKnownActionMappings
(
EControllerHand InHand, |
||
| const FVector & | GetLaserEnd () |
||
| const FVector & | Getters and setters | ||
| FTimespan & | Get when the last time the trackpad position was updated | ||
| UWidgetComponent * | Gets the current hovered widget component if any | ||
| FVector2D | Get the last position of the trackpad or analog stick | ||
| FTimespan & | Get when the last time the trackpad position was updated | ||
| double | Gets last time the interactor pressed on UI | ||
| UMotionControllerComponent * | Get the motioncontroller component of this interactor | ||
| float | Gets the trigger value | ||
| float | Returns the slide delta for pushing and pulling objects. | ||
| AVREditorTeleporter * | |||
| FVector2D | Get the current position of the trackpad or analog stick | ||
| float | GetTrackpadSlideDelta
(
const bool Axis |
Trackpad Gets the trackpad delta of the axis passed. | |
| float | Gets the UI scroll velocity | ||
| UVREditorMode & | GetVRMode () |
Gets the owner of this system | |
| const UVREditorMode & | GetVRMode () |
Gets the owner of this system (const) | |
| bool | Check if the quick menu is on this interactor | ||
| void | Init
(
UVREditorMode* InVRMode |
Initialize default values | |
| bool | IsActionKeyPressed
(
FName ActionName |
||
| bool | IsCarrying () |
Tells us if thie interator is carrying a "carryable" actor, like a camera, which matches the interactor motions instead of using manipulators. | |
| bool | Gets if the interactor is clicking on any UI | ||
| bool | Gets if this interactor is hovering over UI | ||
| bool | Gets if the interactor is right clicking on UI | ||
| bool | Returns whether or not this controller is being used to scrub sequencer | ||
| bool | Check if the touchpad is currently touched | ||
| bool | IsTrackpadPositionValid
(
const int32 AxisIndex |
If the trackpad values are valid | |
| void | ReplaceHandMeshComponent
(
UStaticMesh* NewMesh, |
Replace the default VR controller mesh with a custom one. | |
| void | Resets all the trackpad related values to default. | ||
| void | SetControllerHandSide
(
const FName InControllerHandSide |
Sets the EControllerHand for this motioncontroller | |
| void | SetControllerType
(
const EControllerType InControllerType |
Set what controller type this is for asymmetric control schemes | |
| void | SetForceLaserColor
(
const FLinearColor& InColor |
Next frame this will be used as color for the laser | |
| void | SetForceShowLaser
(
const bool bInForceShow |
Set if we want to force to show the laser | |
| void | SetHasUIOnForearm
(
const bool bInHasUIOnForearm |
Sets if the quick menu is on this interactor | |
| void | SetIsClickingOnUI
(
const bool bInIsClickingOnUI |
Sets if the interactor is clicking on any UI | |
| void | SetIsHoveringOverUI
(
const bool bInIsHoveringOverUI |
Sets if the interactor is hovering over any UI | |
| void | SetIsRightClickingOnUI
(
const bool bInIsRightClickingOnUI |
Sets if the interactor is right hover over any UI | |
| void | SetLastHoveredWidgetComponent
(
UWidgetComponent* NewHoveringOverWidgetComponent |
Sets the current hovered widget component | |
| void | SetLastUIPressTime
(
const double InLastUIPressTime |
Sets the time the interactor last pressed on UI | |
| void | SetUIScrollVelocity
(
const float InUIScrollVelocity |
Sets the UI scroll velocity | |
| void | SetupComponent
(
AActor* OwningActor |
Sets up all components | |
| void | |||
| void | Tick_Implementation
(
const float DeltaTime |
||
| void | Toggles whether or not this controller is being used to scrub sequencer | ||
| bool | TryOverrideControllerType
(
const EControllerType InControllerType |
Temporary set what controller type this is for asymmetric control schemes. | |
| void |
Overridden from UViewportInteractor
| Type | Name | Description | |
|---|---|---|---|
| void | CalculateDragRay
(
double& InOutDragRayLength, |
Needs to be implemented by the base to calculate drag ray length and the velocity for the ray | |
| FHitResult | GetHitResultFromLaserPointer
(
TArray< AActor* >* OptionalListOfIgnoredActors, |
Traces along the laser pointer vector and returns what it first hits in the world | |
| bool | ViewportInteractor overrides, checks if the laser is blocked by UI | ||
| bool | GetTransformAndForwardVector
(
FTransform& OutHandTransform, |
Creates a hand transform and forward vector for a laser pointer for a given hand | |
| void | HandleInputAxis
(
FEditorViewportClient& ViewportClient, |
To be overridden. Called by HandleInputAxis before delegates and default input implementation | |
| void | HandleInputKey
(
FEditorViewportClient& ViewportClient, |
To be overridden. Called by HandleInputKey before delegates and default input implementation | |
| bool | |||
| void | PlayHapticEffect
(
const float Strength |
Starts haptic feedback for physical motion controller | |
| void | PollInput () |
Polls input for the motion controllers transforms | |
| void | PreviewInputKey
(
FEditorViewportClient& ViewportClient, |
To be overridden. Called by HandleInputKey before delegates and default input implementation | |
| void | Reset the values before checking the hover actions |
Constants
| Name | Description |
|---|---|
| MotionController_Left_FullyPressedTriggerAxis | |
| MotionController_Left_PressedTriggerAxis | |
| MotionController_Right_FullyPressedTriggerAxis | |
| MotionController_Right_PressedTriggerAxis | |
| TrackpadPositionX | Special key action names for motion controllers. |
| TrackpadPositionY | |
| TriggerAxis |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bIsPressingTrackpad | Use IsActionKeyPressed(VRActionTypes::ConfirmRadialSelection) instead. | |
| bool | bIsTouchingTrackpad | Use IsActionKeyPressed(VRActionTypes::Touch) instead. |