unreal.InputModifier

class unreal.InputModifier(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: Object

Base class for building modifiers.

C++ Source:

  • Plugin: EnhancedInput

  • Module: EnhancedInput

  • File: InputModifiers.h

get_visualization_color(sample_value, final_value) LinearColor

Helper to allow debug visualization of the modifier.

Parameters:
  • sample_value (InputActionValue) – The base input action value pre-modification (ranging -1 -> 1 across all applicable axes).

  • final_value (InputActionValue) – The post-modification input action value for the provided SampleValue.

Return type:

LinearColor

modify_raw(player_input, current_value, delta_time) InputActionValue

ModifyRaw Will be called by each modifier in the modifier chain

Parameters:
  • player_input (EnhancedPlayerInput) –

  • current_value (InputActionValue) – The modified value returned by the previous modifier in the chain, or the base raw value if this is the first modifier in the chain.

  • delta_time (float) –

Return type:

InputActionValue