Navigation
API > API/Plugins > API/Plugins/PoseSearch
World subsystem accepting the publication of characters (via their AnimInstance(s)) FPoseSearchInteractionAvailability, representing the characters willingness to partecipate in an interaction with other characters from the next frame forward via Query_AnyThread method.
The same method will return the FPoseSearchBlueprintResult from the PREVIOUS Tick processing (categorization of FPoseSearchInteractionAvailability(s) in multiple FInteractionIsland(s)), to the requesting character, containing the animation to play at what time, and the assigned role to partecipate in the selected interaction within the assigned FInteractionIsland
- by calling UPoseSearchInteractionLibrary::MotionMatchInteraction_Pure(TArray
Availabilities, UObject* AnimInstance), characters publish their availabilities to partecipate in interactions to the UPoseSearchInteractionSubsystem - UPoseSearchInteractionSubsystem::Tick processes those FPoseSearchInteractionAvailability(s) and creates/updates UE::PoseSearch::FInteractionIsland. For each FInteractionIsland it injects a tick prerequisite via FInteractionIsland::InjectToActor (that calls AddPrerequisite) to all the Actors in the same island. NoTe: the next frame the execution will be: for each island[k] { for each Actor[k][i] { Tick all the TickActorComponents prerequisites, such as CharacterMovementComponent[k][i] (or Mover) in parallel } Tick Island[k].PreTickFunction (that eventually generates the trajectories with all the updated CMCs or Mover) Tick Actor[k][0].SkeletalMeshComponent (or AnimNextComponent, that performs the MotionMatchInteraction queries for all the involved actors via DoSearch_AnyThread) Tick Island[k].PostTickFunction (currently just a threading fence for the execution of all the other SkeletalMeshComponent(s) or AnimNextComponent(s)) for each Actor[k][i] { if (i != 0) Tick SkeletalMeshComponent[k][i] (or AnimNextComponent(s) that DoSearch_AnyThread get the cached result calculated by Tick Actor[k][0].SkeletalMeshComponent) in parallel } }
- next frame UPoseSearchInteractionLibrary::MotionMatchInteraction_Pure(TArray
Availabilities, UObject* AnimInstance), with the context of all the published availabilities and created islands, will find the associated FInteractionIsland to the AnimInstance and call FInteractionIsland::DoSearch_AnyThread (via UPoseSearchInteractionSubsystem::Query_AnyThread) that will perform ALL (YES, ALL, so the bigger the island the slower the execution) the motion matching searches for all the possible Actors / databases / Roles combinations, and populate FInteractionIsland::SearchResults with ALL the results for the island. Ultimately the MotionMatchInteraction_Pure will return the SearchResults associated to the requesting AnimInstance with information about what animation to play at what time with wich Role.
| Name | UPoseSearchInteractionSubsystem |
| Type | class |
| Header File | /Engine/Plugins/Animation/PoseSearch/Source/Runtime/Public/PoseSearch/PoseSearchInteractionSubsystem.h |
| Include Path | #include "PoseSearch/PoseSearchInteractionSubsystem.h" |
Syntax
UCLASS (MinimalAPI, Experimental, Category="Animation|Pose Search")
class UPoseSearchInteractionSubsystem : public UTickableWorldSubsystem
Inheritance Hierarchy
- FTickableObjectBase → FTickableGameObject → UTickableWorldSubsystem → UPoseSearchInteractionSubsystem
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UTickableWorldSubsystem → UPoseSearchInteractionSubsystem
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AnimContextsAvailabilitiesBuffer | TArray< FPoseSearchInteractionAnimContextAvailabilities > | It could contain duplicated availabilities | PoseSearch/PoseSearchInteractionSubsystem.h |
|
| AnimContextsAvailabilitiesIndex | FThreadSafeCounter | PoseSearch/PoseSearchInteractionSubsystem.h |
|
|
| AnimContextsAvailabilitiesNum | int32 | PoseSearch/PoseSearchInteractionSubsystem.h | ||
| Islands | TArray< UE::PoseSearch::FInteractionIsland * > | Array of groups of characters that needs to be anaylzed together for possible interactions | PoseSearch/PoseSearchInteractionSubsystem.h | |
| ValidInteractionSearches | TArray< UE::PoseSearch::FValidInteractionSearch > | PoseSearch/PoseSearchInteractionSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TConstArrayView< UE::PoseSearch::FInteractionIsland * > GetInteractionIslands() |
PoseSearch/PoseSearchInteractionSubsystem.h | ||
void GetResult_AnyThread
(
const UObject* AnimContext, |
PoseSearch/PoseSearchInteractionSubsystem.h | ||
void Query_AnyThread
(
const TArrayView< const FPoseSearchInteractionAvailability > Availabilities, |
Publishing FPoseSearchInteractionAvailability(s) for the requesting character (via AnimContext as UAnimInstance or UAnimNextComponent) and getting the FPoseSearchBlueprintResult from the PREVIOUS Tick update containing the animation to play at what time, and the assigned role to partecipate in the selected interaction. | PoseSearch/PoseSearchInteractionSubsystem.h |
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Deinitialize() |
PoseSearch/PoseSearchInteractionSubsystem.h | ||
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
PoseSearch/PoseSearchInteractionSubsystem.h |
Overridden from FTickableObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TStatId GetStatId() |
PoseSearch/PoseSearchInteractionSubsystem.h | ||
virtual void Tick
(
float DeltaSeconds |
It processes FPoseSearchInteractionAvailability(s) and creates/updates FInteractionIsland | PoseSearch/PoseSearchInteractionSubsystem.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UPoseSearchInteractionSubsystem * GetSubsystem_AnyThread
(
const UObject* AnimInstance |
PoseSearch/PoseSearchInteractionSubsystem.h | ||
static void OnInteractionContinuing
(
UE::PoseSearch::FValidInteractionSearch& ValidInteractionSearch |
PoseSearch/PoseSearchInteractionSubsystem.h | ||
static void OnInteractionEnd
(
UE::PoseSearch::FValidInteractionSearch& ValidInteractionSearch |
PoseSearch/PoseSearchInteractionSubsystem.h | ||
static void OnInteractionStart
(
UE::PoseSearch::FValidInteractionSearch& ValidInteractionSearch |
PoseSearch/PoseSearchInteractionSubsystem.h |