unreal.AnimGenBehaviorLibrary¶
- class unreal.AnimGenBehaviorLibrary(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
BlueprintFunctionLibraryBlueprint library of helper functions for making and testing behaviors including functions for preparing, processing, and making controls
C++ Source:
Plugin: AnimGen
Module: AnimGen
File: AnimGenBehavior.h
- classmethod apply_simple_avoidance_to_velocity(velocity, actors, self_actor, min_avoidance_radius=25.000000, max_avoidance_radius=150.000000, avoidance_velocity=200.000000) Vector¶
Applies a simple avoidance heuristic to a movement velocity
- classmethod apply_stick_deadzone_and_sensitivity(axis, deadzone=0.200000, sensitivity=2.000000) -> (out_axis=Vector, out_direction=Vector, out_length=float, out_not_in_deadzone=bool)¶
Apply proper dead-zone and sensitivity treatment to stick input
- classmethod apply_trigger_sensitivity(trigger, sensitivity=2.000000) float¶
Apply sensitivity to a trigger value
- classmethod can_look_at_actor(look_at_direction, actor, self_actor, distance_threshold=200.000000, dot_angle_threshold=0.750000) bool¶
Checks if an actor can look at another actor according to some distance and angle thresholds
- classmethod clamp_to_max_distance_from_vector(vector, from_vector, max_distance=100.000000) Vector¶
Clamps one vector to some maximum distance from another vector
- classmethod cycle_name_in_array(names, current_name, steps=1) Name¶
Cycle through an array of names and return the current name
- classmethod desired_direction_to_rotation(direction) Rotator¶
Convert a desired direction to a desired rotation
- classmethod desired_direction_to_rotation_quat(direction) Quat¶
Convert a desired direction to a desired rotation quaternion
- classmethod find_look_at_actor(look_at_direction, actors, self_actor, distance_threshold=200.000000, dot_angle_threshold=0.750000) Actor¶
Finds an actor to look-at according to some distance and angle thresholds
- classmethod find_nearest_index_in_float_array(values, value) int32¶
Find the index of the most similar value in an array of floats
- classmethod is_stick_in_deadzone(axis, deadzone=0.200000) bool¶
Check if the stick is in the deadzone
- classmethod is_stick_not_in_deadzone(axis, deadzone=0.200000) bool¶
Check if the stick is not in the deadzone
- classmethod location_and_direction_difference_below_threshold(current_location, current_direction, target_location, target_direction, location_threshold=25.000000, direction_thresold_angle=10.000000) bool¶
Check if locations and directions are within some distance and angle threshold (in degrees)
- classmethod location_difference_below_threshold(current_location, target_location, location_threshold=25.000000) bool¶
Check if two locations are within some distance threshold
- classmethod make_encoded_behavior_control(control_object, behavior_control_element) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Encoded Behavior
- Parameters:
control_object (AnimGenControlObject)
behavior_control_element (AnimGenControlObjectElement)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_idle_behavior_control(control_object) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Idle Behavior
- Parameters:
control_object (AnimGenControlObject)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_move_to_target_behavior_control(control_object, target_location, target_direction, use_target_direction, root_bone_transform) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Move To Target Behavior
- Parameters:
control_object (AnimGenControlObject)
target_location (Vector)
target_direction (Vector)
use_target_direction (bool)
root_bone_transform (Transform)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_multi_behavior_control(control_object, behavior, behavior_control_element) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Multi Behavior
- Parameters:
control_object (AnimGenControlObject)
behavior (Name)
behavior_control_element (AnimGenControlObjectElement)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_null_optional_behavior_control(control_object) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a null control object element for the Optional Behavior
- Parameters:
control_object (AnimGenControlObject)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_tagged_behavior_control(control_object, behavior_control_element, desired_tags) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Tagged Behavior
- Parameters:
control_object (AnimGenControlObject)
behavior_control_element (AnimGenControlObjectElement)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_trajectory_follow_behavior_control(control_object, transform_trajectory, root_bone_transform, trajectory_sample_num=4, trajectory_future_time=1.000000, trajectory_past_time=0.000000, trajectory_forward_vector=[0.000000, 1.000000, 0.000000]) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Trajectory Following Behavior
- Parameters:
control_object (AnimGenControlObject)
transform_trajectory (TransformTrajectory)
root_bone_transform (Transform)
trajectory_sample_num (int32)
trajectory_future_time (float)
trajectory_past_time (float)
trajectory_forward_vector (Vector)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_trajectory_interaction_behavior_control(control_object, transform_trajectory, root_bone_transform, interaction_location=[0.000000, 0.000000, 0.000000], interaction_direction=[1.000000, 0.000000, 0.000000], interaction_active=False, trajectory_sample_num=4, trajectory_future_time=1.000000, trajectory_past_time=0.000000, trajectory_forward_vector=[0.000000, 1.000000, 0.000000]) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Trajectory Interaction Behavior
- Parameters:
control_object (AnimGenControlObject)
transform_trajectory (TransformTrajectory)
root_bone_transform (Transform)
interaction_location (Vector)
interaction_direction (Vector)
interaction_active (bool)
trajectory_sample_num (int32)
trajectory_future_time (float)
trajectory_past_time (float)
trajectory_forward_vector (Vector)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_uncontrolled_behavior_control(control_object) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a control object element for the Uncontrolled Behavior
- Parameters:
control_object (AnimGenControlObject)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_valid_optional_behavior_control(control_object, behavior_control_element) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make a valid control object element for the Optional Behavior
- Parameters:
control_object (AnimGenControlObject)
behavior_control_element (AnimGenControlObjectElement)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod make_valid_optional_behavior_control_on_condition(control_object, behavior_control_element, condition) -> (AnimGenControlObjectElement, control_object=AnimGenControlObject)¶
Make Valid Optional Behavior Control on Condition
- Parameters:
control_object (AnimGenControlObject)
behavior_control_element (AnimGenControlObjectElement)
condition (bool)
- Returns:
control_object (AnimGenControlObject):
- Return type:
- classmethod project_onto_floor(location, floor_height=0.000000) Vector¶
Projects a location onto the floor plane given by the provided height
- classmethod update_desired_rotation_from_axis(desired_rotation, axis, deadzone=0.200000, sensitivity=2.000000) Rotator¶
Update the desired rotation from a stick axis
- classmethod update_desired_velocity_and_rotation_from_axes(desired_velocity, desired_rotation, velocity_axis, facing_axis, velocity_speed=150.000000, deadzone=0.200000, sensitivity=2.000000) -> (desired_velocity=Vector, desired_rotation=Rotator)¶
Update the desired velocity and rotation from two stick axes
- classmethod update_desired_velocity_and_rotation_from_axis_and_camera_trigger(desired_velocity, desired_rotation, camera_yaw_rotation, velocity_axis, facing_trigger, minimum_speed=75.000000, maximum_speed=150.000000, deadzone=0.200000, sensitivity=2.000000) -> (desired_velocity=Vector, desired_rotation=Rotator)¶
Update the desired velocity and rotation from a stick axes and camera trigger
- Parameters:
- Returns:
desired_velocity (Vector):
desired_rotation (Rotator):
- Return type:
tuple