Related Classes
- ULayoutComponentLogic
- UButtonLogic
- UJoystickLogic
- UAdvancedJoystickLogic
- UMultitouchLogic
- UFreeTouchLogic
- UKnobLogic
- USliderLogic
- SLayoutComponent
SUMMARY #
This class defines how the component reacts to inputs and allows the input value to be modified. Is it a button with a vibration or sound trigger? Is it a joystick with advanced features like auto run or drag to sprint? Etc.
HOW TO CREATE LOGIC? #
PROPERTIES #
Should Tick
Value Type : boolean
Default : False
Whether or not this logic can be tick (call OnTick function each frame).
Input Triggers
Value Type : TArray<TObjectPtr<UInputTrigger>>
Default : Empty array
Affect the component logic behavior.
Input Modifiers
Value Type : TArray<TObjectPtr<UVirtualInputModifier>>
Default : Empty array
Modify the raw value of input.
BLUEPRINT NATIVE EVENT #
Initialize

Called when component is initialized
Deinitialize

Called when component is deinitialized
On Press

Input Type : const FGeometry&, const FPointerEvent&
Called when user hit this component. Start capture pointer
On Move

Input Type : const FGeometry&, const FPointerEvent&
Called when user move it’s finger inside this component.
On Release

Input Type : const FGeometry&, const FPointerEvent&
Called when user release it’s finger from this component. Release pointer capture.
On Tick

Input Type : const FGeometry&, const FPointerEvent&
Called each frame if bShouldTick is enabled.
FUNCTIONS #
Get Pawn

Output Type : APawn*
Returns the pawn controlled by player controller. The Player controller is retrieved from the local player. See GetPlayerController
Get Player Controller

Output Type : APlayerController*
Returns the player controller of local player.
Get Decorator

Output Type : ULayoutComponentDecorator*
Returns the decorator used by this component.
Get Touch Input Object

OutputType : UTouchInputComponent*
Returns the touch input component.
Get Last Component Geometry

Output Type : const FGeometry&
Returns the geometry of touch input component.
Inject Input

Input Type : const UInputAction*, FInputActionValue, bool
Start injecting input (inject input each frame until stop)
- Action : Input action asset
- Raw Value : value of input
- Inject Immediately : if enabled, injects the input immediately, otherwise wait for the next tick.
Inject Input In Frame

Return Type : const UInputAction*, FInputActionValue
Inject input in one frame
- Action : Input action asset
- Raw Value : value of input
Stop Injecting Input

Input Type : const UInputAction*
Stop injecting input.
Check if input action asset is currently used to inject input.
- Action : Input action asset.
Is Input Injected

Input Type : UInputAction*
Output Type : boolean
Return true if input action asset is currently used to inject input.
Set Input Action

Input Type : UInputAction*
Changes the input action used by this logic
Warning! If input action currently inject input, call Stop Injecting Input before change.
- New Input Action : new input action asset to use.
Enable Input

Enable input. This logic will now process inputs.
Disable Input

Disable input. This logic will not process inputs.
Is Input Enabled

Output Type : bool
Return true if this logic process inputs
Enable Tick

Enable tick. This logic will call OnTick every frame. Needed for input injection each frame.
Disable Tick

Disable tick on this logic. Warning! Disable input injection each frame.
Play Sound

Input Type : USoundBase*
Simple function to play UI sound.
- Sound : Sound asset to play
Play Haptic

Input Type : UForceFeedbackEffect*, bool, bool, bool
Simple function to trigger a vibration
- Force Feedback Effect : force feedback effect asset
- Looping : If enabled, the vibration restarts when it has finished.
- Ignore Time Dilation : If enabled, ignore time dilation.
- Play While Paused : If enabled, the vibration is played even if the game is paused.
Stop Haptic

Input Type : UForceFeedbackEffect*
Stop vibration
- Force feedback effect : force feedback effect to stop
Is Haptic Played

Input Type : UForceFeedbackEffect*
Output Type : bool
Return true of a vibration is being processed
- Force Feedback Effect : force feedback effect asset to check
