unreal.InputTrigger
¶
- class unreal.InputTrigger(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
Base class for building triggers. Transitions to Triggered state once the input meets or exceeds the actuation threshold.
C++ Source:
Plugin: EnhancedInput
Module: EnhancedInput
File: InputTriggers.h
Editor Properties: (see get_editor_property/set_editor_property)
actuation_threshold
(float): [Read-Write] Point at which this trigger fireslast_value
(InputActionValue): [Read-Write] Value passed to UpdateState on the previous tick. This will be updated automatically after the trigger is updated.should_always_tick
(bool): [Read-Write] Decides whether this trigger ticks every frame or not.This WILL affect performance and should only be used in specific custom triggers.
- get_trigger_type() TriggerType ¶
- Changes the way this trigger affects an action with multiple triggers:
All implicit triggers must be triggering to trigger the action. If there are any explicit triggers at least one must be triggering to trigger the action.
- Return type:
- is_actuated(for_value) bool ¶
Is the value passed in sufficiently large to be of interest to the trigger.
This is a helper function that implements the most obvious (>=) interpretation of the actuation threshold.
- Parameters:
for_value (InputActionValue) –
- Return type:
- property last_value: InputActionValue¶
[Read-Only] Value passed to UpdateState on the previous tick. This will be updated automatically after the trigger is updated.
- Type:
- property should_always_tick: bool¶
[Read-Only] Decides whether this trigger ticks every frame or not. * This WILL affect performance and should only be used in specific custom triggers.
- Type:
(bool)
- update_state(player_input, modified_value, delta_time) TriggerState ¶
- This function checks if the requisite conditions have been met for the trigger to fire.
- Returns Trigger State None - No trigger conditions have been met. Trigger is inactive.
Trigger State Ongoing - Some trigger conditions have been met. Trigger is processing but not yet active. Trigger State Triggered - All trigger conditions have been met to fire. Trigger is active.
- Parameters:
player_input (EnhancedPlayerInput) –
modified_value (InputActionValue) –
delta_time (float) –
- Return type: