Navigation
API > API/Runtime > API/Runtime/Constraints
References
| Module | Constraints |
| Header | /Engine/Source/Runtime/Experimental/Animation/Constraints/Public/ConstraintsManager.h |
| Include | #include "ConstraintsManager.h" |
Syntax
class FConstraintsManagerController
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | AddConstraint
(
UTickableConstraint* InConstraint |
Add this constraint to the manager | |
| UTickableConstraint * | AddConstraintFromCopy
(
UTickableConstraint* CopyOfConstraint |
Make a copy of this constraint and add it to the manager, returns the copy mode if it was added | |
| TConstraint * | AllocateConstraintT
(
const FName& InBaseName |
Allocates a new constraint with the constraints manager as the owner. | |
| bool | DoesExistInAnyWorld
(
UTickableConstraint* InConstraint |
When PIEing/Simulating it's possible that the constraint isn't in the active manager but still lives | |
| void | Go through each constraint in order and evaluate and tick them | ||
| FConstraintsManagerController & | Get and Set Controller acive in this world | ||
| TArray< TObjectPtr< UTickableConstraint > > | GetAllConstraints
(
const bool bSorted |
Returns manager's constraints array (sorted if needed). | |
| UTickableConstraint * | GetConstraint
(
const int32 InConstraintIndex |
Returns the constraint based on it's index within the manager's constraints array. | |
| UTickableConstraint * | GetConstraint
(
const FName& InConstraintName |
Returns the constraint based on it's name within the manager's constraints array. | |
| int32 | GetConstraintIndex
(
const FName& InConstraintName |
Get the index of the given constraint's name. | |
| const TArray< TObjectPtr< UTickableConstraint > > & | Get read-only access to the array of constraints. | ||
| TArray< TObjectPtr< UTickableConstraint > > | GetConstraintsByPredicate
(
Predicate Pred, |
Returns a filtered constraints array checking if the predicate for each element is true. | |
| FConstraintsManagerNotifyDelegate & | Delegate to trigger changes in the constraints manager. | ||
| TArray< TObjectPtr< UTickableConstraint > > | GetParentConstraints
(
const uint32 InTargetHash, |
Get parent constraints of the specified child. | |
| void | Notify from changes in the constraints manager. | ||
| FOnSceneComponentConstrained & | Delegate that's fired when a scene component is constrained, this is needed to make sure things like gizmo's get updated after the constraint tick happens | ||
| bool | RemoveConstraint
(
const int32 InConstraintIndex, |
Remove the constraint at the given index. | |
| bool | RemoveConstraint
(
const FName& InConstraintName, |
Remove the constraint by name. | |
| bool | RemoveConstraint
(
UTickableConstraint* InConstraint, |
Remove constraint by ptr | |
| void | SetConstraintsDependencies
(
const FName& InNameToTickBefore, |
Set dependencies between two constraints. |
Typedefs
| Name | Description |
|---|---|
| FOnSceneComponentConstrained | Delegeate that's fired when a scene component is constrained, this is needed to make sure things like gizmo's get updated after the constraint tick happens |
Constants
| Name | Description |
|---|---|
| bDoNotRemoveConstraint | Static to control if we should remove constraints or not, may not want to do some when compensating since we may be deleting spawnables while doing so |