Navigation
API > API/Plugins > API/Plugins/PhysicsControl
Asset for storing Physics Control Profiles. The asset will contain data that define:
- Controls and body modifiers to be created on a mesh
- Sets referencing those controls and body modifiers
- Full profiles containing settings for all the controls/modifiers
- Sparse profiles containing partial sets of settings for specific controls/modifiers
It will also be desirable to support "inheritance" - so a generic profile can be made, and then customized for certain characters or scenarios.
| Name | UPhysicsControlAsset |
| Type | class |
| Header File | /Engine/Plugins/Experimental/PhysicsControl/Source/PhysicsControl/Public/PhysicsControlAsset.h |
| Include Path | #include "PhysicsControlAsset.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType)
class UPhysicsControlAsset :
public UObject ,
public IInterface_PreviewMeshProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UPhysicsControlAsset
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UPhysicsControlAsset() |
PhysicsControlAsset.h |
Classes
| Name | Remarks |
|---|---|
| FOnControlAssetCompiled |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AdditionalControlsAndModifiers | FPhysicsControlAndBodyModifierCreationDatas | Additional controls and modifiers. | PhysicsControlAsset.h | |
| AdditionalProfileAssets | TArray< TSoftObjectPtr< UPhysicsControlAsset > > | Additional profile assets from which profiles (not the setup data, extra sets etc) will be added to this asset. | PhysicsControlAsset.h |
|
| AdditionalSets | FPhysicsControlSetUpdates | Additional control and body modifier sets | PhysicsControlAsset.h | |
| bAutoCompileProfiles | bool | Whether editing the profiles will automatically compile. | PhysicsControlAsset.h |
|
| bAutoCompileSetup | bool | Whether editing the setup data will automatically compile. | PhysicsControlAsset.h |
|
| bAutoInvokeProfileAfterSetup | bool | Whether to automatically re-invoke the previously invoked profile after automatically running the setup. | PhysicsControlAsset.h |
|
| bAutoInvokeProfiles | bool | Whether to automatically invoke profiles that have been edited (and have auto-compiled) when simulating. | PhysicsControlAsset.h |
|
| bAutoReinitSetup | bool | Whether to automatically reinitialize following editing of setup data (when auto-compiling) when simulating. | PhysicsControlAsset.h |
|
| CharacterSetupData | FPhysicsControlCharacterSetupData | We can define controls in the form of limbs etc here | PhysicsControlAsset.h | |
| InitialControlAndModifierUpdates | TArray< FPhysicsControlControlAndModifierUpdates > | Initial updates to apply immediately after controls and modifiers are created | PhysicsControlAsset.h | |
| MyAdditionalControlsAndModifiers | FPhysicsControlAndBodyModifierCreationDatas | Additional controls and modifiers. | PhysicsControlAsset.h |
|
| MyAdditionalSets | FPhysicsControlSetUpdates | Additional control and body modifier sets | PhysicsControlAsset.h |
|
| MyCharacterSetupData | FPhysicsControlCharacterSetupData | "My" runtime data - i.e. the data that will be combined with what has been inherited We should have custom UI that displays this combined with the inherited data We can define controls in the form of limbs etc here | PhysicsControlAsset.h |
|
| MyInitialControlAndModifierUpdates | TArray< FPhysicsControlControlAndModifierUpdates > | Initial updates to apply immediately after controls and modifiers are created | PhysicsControlAsset.h |
|
| MyProfiles | TMap< FName, FPhysicsControlControlAndModifierUpdates > | The named profiles, which are essentially control and modifier updates | PhysicsControlAsset.h |
|
| ParentAsset | TSoftObjectPtr< UPhysicsControlAsset > | A profile asset to inherit from (can be null). If set, we will just add/modify data in that | PhysicsControlAsset.h |
|
| PhysicsAsset | TSoftObjectPtr< UPhysicsAsset > | The PhysicsAsset that this control asset is targeting. Can also get the preview mesh from this | PhysicsControlAsset.h |
|
| Profiles | TMap< FName, FPhysicsControlControlAndModifierUpdates > | The named profiles, which are essentially control and modifier updates | PhysicsControlAsset.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Compile() |
Collapses inherited and authored profiles etc to make a profile asset that can be read without need for subsequent processing. | PhysicsControlAsset.h |
|
FPhysicsControlAndBodyModifierCreationDatas GetAdditionalControlsAndModifiers() |
Combines and returns data from our parent and ourself | PhysicsControlAsset.h | |
FPhysicsControlSetUpdates GetAdditionalSets() |
Combines and returns data from our parent and ourself | PhysicsControlAsset.h | |
FPhysicsControlCharacterSetupData GetCharacterSetupData() |
Combines and returns data from our parent and ourself | PhysicsControlAsset.h | |
| Returns a list of all the profiles that need compilation | PhysicsControlAsset.h |
|
|
TArray< FPhysicsControlControlAndModifierUpdates > GetInitialControlAndModifierUpdates() |
Combines and returns data from our parent and ourself | PhysicsControlAsset.h | |
UPhysicsAsset * GetPhysicsAsset() |
END IInterface_PreviewMeshProvider interface This loads the asset if necessary | PhysicsControlAsset.h | |
virtual USkeletalMesh * GetPreviewMesh() |
PhysicsControlAsset.h | ||
TMap< FName, FPhysicsControlControlAndModifierUpdates > GetProfiles() |
Combines and returns data from our parent and ourself | PhysicsControlAsset.h | |
bool IsCompilationNeeded () |
Returns true if compilation would change any of our compiled data. | PhysicsControlAsset.h |
|
bool IsSetupDirty() |
Returns true if the setup data need compilation such that the controls etc need to be re-initialized. | PhysicsControlAsset.h |
|
FOnControlAssetCompiled & OnControlAssetCompiled() |
PhysicsControlAsset.h | ||
void SetPhysicsAsset
(
UPhysicsAsset* InPhysicsAsset |
PhysicsControlAsset.h | ||
virtual void SetPreviewMesh
(
USkeletalMesh* PreviewMesh, |
IInterface_PreviewMeshProvider interface | PhysicsControlAsset.h | |
void ShowCompiledData() |
Shows all the controls etc that would be made | PhysicsControlAsset.h |
|
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const FName GetPreviewMeshPropertyName() |
PhysicsControlAsset.h |