Navigation
API > API/Plugins > API/Plugins/PhysicsControl > API/Plugins/PhysicsControl/UPhysicsControlComponent
References
| Module | PhysicsControl |
| Header | /Engine/Plugins/Experimental/PhysicsControl/Source/PhysicsControl/Public/PhysicsControlComponent.h |
| Include | #include "PhysicsControlComponent.h" |
| Source | /Engine/Plugins/Experimental/PhysicsControl/Source/PhysicsControl/Private/PhysicsControlComponent.cpp |
UFUNCTION&40;BlueprintCallable, Category&61;PhysicsControl&41;
TArray< FName > CreateControlsFromSkeletalMeshAndConstraintProfile
&40;
USkeletalMeshComponent &42; SkeletalMeshComponent,
const TArray< FName > & BoneNames,
const FName ConstraintProfile,
const FName Set,
const bool bEnabled
&41;
Remarks
Creates a collection of ParentSpace controls controlling a skeletal mesh, initializing them with a constraint profile An array of the controls that have been created
Parameters
| Name | Description |
|---|---|
| SkeletalMeshComponent | The skeletal mesh which will have controls |
| BoneNames | The names of bones for which controls should be created. Each bone will be the child in a control |
| ConstraintProfile | The constraint profile to use for initializing the control strength and damping (etc) parameters. Note that the controls will all be created in " parent space" - i.e. with each part controlled relative to its parent. The strength and damping will be taken from the values that the relevant joint in the physics asset would have given the constraint profile (or the default profile if it can't be found) - though they will not match exactly if the linear drive and different x/y/z values, or if the angular drive was using twist/swing instead of slerp. Note also that the joint constraints do not use the animation velocity as a target, so when creating controls in this way the control settings will set the skeletal animation velocity multiplier to zero. |
| Set | Which set to include the control in (optional). Note that it automatically gets added to the set "All" |
| bEnabled | If true then the control will be enabled immediately. If false you will need to call SetControlEnabled(true) in order to enable it. |