unreal.FallingMode¶
- class unreal.FallingMode(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BaseMovementModeFallingMode: a default movement mode for moving through the air and jumping, typically influenced by gravity and air control
C++ Source:
Plugin: Mover
Module: Mover
File: FallingMode.h
Editor Properties: (see get_editor_property/set_editor_property)
air_control_percentage(float): [Read-Write] When falling, amount of movement control available to the actor. 0 = no control, 1 = full controlcancel_vertical_speed_on_landing(bool): [Read-Write] If true, actor will land and lose all speed in the vertical direction upon landing. If false, actor’s vertical speed will be redirected based on the surface normal it hit. Note: Actor’s horizontal speed will not be affected if true. If false, horizontal speed may be increased on landing.falling_deceleration(float): [Read-Write] Deceleration to apply to air movement when falling slower than terminal velocity. Note: This is NOT applied to vertical velocity, only movement plane velocityfalling_lateral_friction(float): [Read-Write] Friction to apply to air movement. Lateral velocity is scaled each tick by a factor (1-Friction * TimeStep) so friction values greater than 1/TimeStep will result in all lateral velocity being removed. Note: This is NOT applied to vertical velocity, only movement plane velocitygameplay_tags(GameplayTagContainer): [Read-Write] A list of gameplay tags associated with this movement modeon_landed(Mover_OnLanded): [Read-Write] Broadcast when this actor lands on a valid surface.over_terminal_speed_falling_deceleration(float): [Read-Write] Deceleration to apply to air movement when falling faster than terminal velocity Note: This is NOT applied to vertical velocity, only movement plane velocityshared_settings_classes(Array[type(Class)]): [Read-Write] Settings object type that this mode depends on. May be shared with other movement modes. When the mode is added to a Mover Component, it will create a shared instance of this settings class.should_clamp_terminal_vertical_speed(bool): [Read-Write] When exceeding maximum vertical speed, should it be enforced via a hard clamp? If false, VerticalFallingDeceleration will be used for a smoother transition to the terminal speed limit.supports_async(bool): [Read-Write] Whether this movement mode supports being part of an asynchronous movement simulation (running concurrently with the gameplay thread) Specifically for the GenerateMove and SimulationTick functionsterminal_movement_plane_speed(float): [Read-Write] If the actor’s movement plane velocity is greater than this speed falling will start applying OverTerminalSpeedFallingDeceleration instead of FallingDeceleration The expected behavior is to set OverTerminalSpeedFallingDeceleration higher than FallingDeceleration so the actor will slow down faster when going over TerminalMovementPlaneSpeed.terminal_vertical_speed(float): [Read-Write] If the actors vertical velocity is greater than this speed VerticalFallingDeceleration will be applied to vertical velocitytransitions(Array[BaseMovementModeTransition]): [Read-Write] Transition checks for the current mode. Evaluated in order, stopping at the first successful transition checkvertical_falling_deceleration(float): [Read-Write] Deceleration to apply to vertical velocity when it’s greater than TerminalVerticalSpeed. Only used if bShouldClampTerminalVerticalSpeed is false.
- property air_control_percentage: float¶
[Read-Write] When falling, amount of movement control available to the actor. 0 = no control, 1 = full control
- Type:
(float)
- property cancel_vertical_speed_on_landing: bool¶
[Read-Write] If true, actor will land and lose all speed in the vertical direction upon landing. If false, actor’s vertical speed will be redirected based on the surface normal it hit. Note: Actor’s horizontal speed will not be affected if true. If false, horizontal speed may be increased on landing.
- Type:
(bool)
- property falling_deceleration: float¶
[Read-Write] Deceleration to apply to air movement when falling slower than terminal velocity. Note: This is NOT applied to vertical velocity, only movement plane velocity
- Type:
(float)
- property falling_lateral_friction: float¶
[Read-Write] Friction to apply to air movement. Lateral velocity is scaled each tick by a factor (1-Friction * TimeStep) so friction values greater than 1/TimeStep will result in all lateral velocity being removed. Note: This is NOT applied to vertical velocity, only movement plane velocity
- Type:
(float)
- property on_landed: Mover_OnLanded¶
[Read-Write] Broadcast when this actor lands on a valid surface.
- Type:
- property over_terminal_speed_falling_deceleration: float¶
[Read-Write] Deceleration to apply to air movement when falling faster than terminal velocity Note: This is NOT applied to vertical velocity, only movement plane velocity
- Type:
(float)
- process_landed(floor_result) -> (velocity=Vector, base_info=RelativeBaseInfo, tick_end_data=MoverTickEndData)¶
Is called at the end of the tick in falling mode. Handles checking any landings that should occur and switching to specific modes (i.e. landing on a walkable surface would switch to the walking movement mode)
- Parameters:
floor_result (FloorCheckResult)
- Returns:
velocity (Vector):
base_info (RelativeBaseInfo):
tick_end_data (MoverTickEndData):
- Return type:
tuple
- property should_clamp_terminal_vertical_speed: bool¶
[Read-Write] When exceeding maximum vertical speed, should it be enforced via a hard clamp? If false, VerticalFallingDeceleration will be used for a smoother transition to the terminal speed limit.
- Type:
(bool)
- property terminal_movement_plane_speed: float¶
[Read-Write] If the actor’s movement plane velocity is greater than this speed falling will start applying OverTerminalSpeedFallingDeceleration instead of FallingDeceleration The expected behavior is to set OverTerminalSpeedFallingDeceleration higher than FallingDeceleration so the actor will slow down faster when going over TerminalMovementPlaneSpeed.
- Type:
(float)