Navigation
API > API/Plugins > API/Plugins/ScriptableToolsFramework > API/Plugins/ScriptableToolsFramework/UScriptableClickDragTool
Description
Hover Support API OnHoverHitTest is called to allow the Tool to indicate if it would like to start consuing "hover" input at HoverPos. The Tool can return yes/no and a "hit depth", which will be used to determine if the Tool is given the active hover input stream. The default OnHoverHitTest implement always captures the hover.
Once the hover is accepted, the OnHoverBegin event will fire, and then a stream of OnHoverUpdate events. If at any point the hover is no longer relevant, OnHoverUpdate should return false. OnHoverEnd will be called at that point, or if the hover is cancelled for any reason (eg mouse goes out of window, button is pressed, etc)
| Name | OnHoverHitTest |
| Type | function |
| Header File | /Engine/Plugins/Runtime/ScriptableToolsFramework/Source/ScriptableToolsFramework/Public/BaseTools/ScriptableClickDragTool.h |
| Include Path | #include "BaseTools/ScriptableClickDragTool.h" |
UFUNCTION (BlueprintNativeEvent, Category="Hover Events")
FInputRayHit OnHoverHitTest
(
FInputDeviceRay HoverPos,
const FScriptableToolModifierStates & Modifiers
)
a FInputRayHit indicating a hit (true/false) and the hit depth along the hit-ray (0 for "always consume")
Parameters
| Name | Remarks |
|---|---|
| HoverPos | the current position of the cursor/device, including both a 3D ray from the eye, and (optionally) a 2D mouse position |
| Modifiers | current modifier key/button state |