Navigation
API > API/Editor > API/Editor/ViewportInteraction
Represents the interactor in the world
| Name | UViewportInteractor |
| Type | class |
| Header File | /Engine/Source/Editor/ViewportInteraction/Public/ViewportInteractor.h |
| Include Path | #include "ViewportInteractor.h" |
Syntax
UCLASS (Abstract, Blueprintable, BlueprintType)
class UViewportInteractor : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UViewportInteractor
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UViewportInteractor() |
Default constructor | ViewportInteractor.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CurrentHitResultGizmoFilterMode | EHitResultGizmoFilterMode | ViewportInteractor.h | ||
| SmoothingOneEuroFilter | ViewportInteractionUtils::FOneEuroFilter | Smoothing filter for laser | ViewportInteractor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddKeyAction
(
const FKey& Key, |
Adds a new action to the KeyToActionMap | ViewportInteractor.h | |
virtual void CalculateDragRay
(
float& InOutDragRayLength, |
ViewportInteractor.h | ||
virtual void CalculateDragRay
(
double& InOutDragRayLength, |
Needs to be implemented by the base to calculate drag ray length and the velocity for the ray | ViewportInteractor.h | |
bool CanCarry() |
Gets if the interactor can carry an object | ViewportInteractor.h |
|
FViewportActionKeyInput * GetActionWithName
(
const FName InActionName |
Gets a certain action by iterating through the map looking for the same ActionType | ViewportInteractor.h | |
EViewportInteractionDraggingMode GetDraggingMode() |
Gets the current interactor data dragging mode | ViewportInteractor.h |
|
float GetDragHapticFeedbackStrength() |
Gets the drag haptic feedback strength console variable | ViewportInteractor.h | |
FVector GetDragTranslationVelocity() |
Gets the interactor data drag velocity | ViewportInteractor.h | |
bool GetGrabberSphere
(
FSphere& OutGrabberSphere, |
Gets a sphere on this interactor that can be used to interact with objects in close proximity | ViewportInteractor.h | |
virtual FHitResult GetHitResultFromLaserPointer
(
TArray< AActor* >* OptionalListOfIgnoredActors, |
Traces along the laser pointer vector and returns what it first hits in the world | ViewportInteractor.h | |
virtual FHitResult GetHitResultFromLaserPointer
(
TArray< AActor* >* OptionalListOfIgnoredActors, |
Traces along the laser pointer vector and returns what it first hits in the world | ViewportInteractor.h | |
EHitResultGizmoFilterMode GetHitResultGizmoFilterMode() |
Gets current gizmo filter mode used for Interaction | ViewportInteractor.h |
|
FVector GetHoverLocation() |
Gets the interactor laser hover location | ViewportInteractor.h |
|
const FViewportInteractorData & GetInteractorData () |
Gets the private data for this interactor (const) | ViewportInteractor.h | |
| Gets the private data for this interactor | ViewportInteractor.h | ||
virtual bool GetIsLaserBlocked () |
To be overridden by base class. | ViewportInteractor.h | |
bool GetLaserPointer
(
FVector& LaserPointerStart, |
Gets the start and end point of the laser pointer for the specified hand | ViewportInteractor.h |
|
float GetLaserPointerMaxLength() |
Gets the maximum length of a laser pointer | ViewportInteractor.h | |
EViewportInteractionDraggingMode GetLastDraggingMode() |
Gets the interactor data previous dragging mode | ViewportInteractor.h | |
virtual UActorComponent * GetLastHoverComponent() |
Gets the last component hovered on by the interactor laser. | ViewportInteractor.h | |
FTransform GetLastRoomSpaceTransform() |
Gets the last hand transform of the interactor, in the local tracking space | ViewportInteractor.h |
|
FTransform GetLastTransform() |
Gets the last world transform of this interactor | ViewportInteractor.h |
|
UViewportInteractor * GetOtherInteractor() |
Gets the paired interactor assigned by the world interaction, can return null when there is no other interactor | ViewportInteractor.h |
|
FTransform GetRoomSpaceTransform() |
Gets the hand transform of the interactor, in the local tracking space | ViewportInteractor.h |
|
FTransform GetTransform() |
Gets the world transform of this interactor | ViewportInteractor.h |
|
virtual bool GetTransformAndForwardVector
(
FTransform& OutHandTransform, |
Creates a hand transform and forward vector for a laser pointer for a given hand | ViewportInteractor.h |
|
UViewportWorldInteraction * GetWorldInteraction() |
Gets the world interaction | ViewportInteractor.h |
|
bool HandleInputAxis
(
FEditorViewportClient& ViewportClient, |
Handles axis input and translates it to actions C++ Child classes are expected to to call there super versions of this. | ViewportInteractor.h | |
bool HandleInputKey
(
FEditorViewportClient& ViewportClient, |
Handles key input and translates it actions C++ Child classes are expected to to call there super versions of this. | ViewportInteractor.h | |
bool IsHovering() |
If the interactor laser is currently hovering | ViewportInteractor.h | |
bool IsHoveringOverGizmo() |
If the interactor laser is currently hovering over a gizmo handle | ViewportInteractor.h |
|
bool IsHoveringOverPriorityType() |
If this interactor is hovering over a type that has priority from GetHitResultFromLaserPointer | ViewportInteractor.h | |
bool IsHoveringOverSelectedActor() |
Returns true if currently hovering over selected actor | ViewportInteractor.h | |
virtual bool IsModifierPressed() |
ViewportInteractor.h | ||
virtual void OnStartDragging
(
const FVector& HitLocation, |
Called by StartDragging in world interaction to give the interactor a chance of acting upon starting a drag operation | ViewportInteractor.h | |
virtual void PlayHapticEffect
(
const float Strength |
Triggers a force feedback effect on device if possible | ViewportInteractor.h | |
virtual void PollInput() |
Base classes need to implement getting the input for the input devices for that interactor | ViewportInteractor.h | |
void RemoveKeyAction
(
const FKey& Key |
Removes an action from the KeyToActionMap | ViewportInteractor.h | |
void RemoveOtherInteractor() |
Removes the other interactor reference for this interactor | ViewportInteractor.h | |
virtual void ResetHoverState() |
Reset the values before checking the hover actions | ViewportInteractor.h | |
void ResetLaserEnd() |
Reset the stored laser end location at the end of tick | ViewportInteractor.h | |
void SetCanCarry
(
const bool bInCanCarry |
Sets if the interactor can carry an object | ViewportInteractor.h |
|
void SetDraggingMode
(
const EViewportInteractionDraggingMode NewDraggingMode |
Sets the current dragging mode for this interactor | ViewportInteractor.h |
|
void SetHitResultGizmoFilterMode
(
EHitResultGizmoFilterMode newFilter |
Sets the current gizmo filter mode used for Interaction | ViewportInteractor.h |
|
void SetHoverLocation
(
const FVector& InHoverLocation |
Sets the hover location | ViewportInteractor.h | |
void SetOtherInteractor
(
UViewportInteractor* InOtherInteractor |
Sets the other interactor | ViewportInteractor.h | |
void SetWorldInteraction
(
UViewportWorldInteraction* InWorldInteraction |
Sets the world interaction | ViewportInteractor.h | |
void Shutdown() |
Whenever the ViewportWorldInteraction is shut down, the interacts will shut down as well | ViewportInteractor.h |
|
void Tick
(
const float DeltaTime |
Update for this interactor called by the ViewportWorldInteraction | ViewportInteractor.h |
|
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool AllowLaserSmoothing() |
If this interactors allows to smooth the laser. Default is true. | ViewportInteractor.h | |
virtual void HandleInputAxis
(
FEditorViewportClient& ViewportClient, |
To be overridden. Called by HandleInputAxis before delegates and default input implementation | ViewportInteractor.h | |
void HandleInputAxis_BP
(
const FViewportActionKeyInput& Action, |
To be overridden. Called by HandleInputAxis before delegates and default input implementation | ViewportInteractor.h |
|
virtual void HandleInputKey
(
FEditorViewportClient& ViewportClient, |
To be overridden. Called by HandleInputKey before delegates and default input implementation | ViewportInteractor.h | |
void HandleInputKey_BP
(
const FViewportActionKeyInput& Action, |
To be overridden. Called by HandleInputKey before delegates and default input implementation | ViewportInteractor.h |
|
virtual void PreviewInputAxis
(
FEditorViewportClient& ViewportClient, |
To be overridden. Called by HandleInputAxis before delegates and default input implementation | ViewportInteractor.h | |
virtual void PreviewInputKey
(
FEditorViewportClient& ViewportClient, |
To be overridden. Called by HandleInputKey before delegates and default input implementation | ViewportInteractor.h |