Navigation
API > API/Runtime > API/Runtime/Constraints
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UTickableConstraint
- UTickableTransformConstraint
- UTickableLookAtConstraint
- UTickableParentConstraint
- UTickableRotationConstraint
- UTickableScaleConstraint
- UTickableTranslationConstraint
References
| Module | Constraints |
| Header | /Engine/Source/Runtime/Experimental/Animation/Constraints/Public/TransformConstraint.h |
| Include | #include "TransformConstraint.h" |
Syntax
class UTickableTransformConstraint : public UTickableConstraint
Remarks
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bDynamicOffset | Should the child be able to change it's offset dynamically. | |
| bool | bMaintainOffset | Should that constraint maintain the default offset. | |
| TObjectPtr< UTransformableHandle > | ChildTRSHandle | The transformable handle representing the child of that constraint. | |
| TObjectPtr< UTransformableHandle > | ParentTRSHandle | The transformable handle representing the parent of that constraint. | |
| ETransformConstraintType | Type | Defines the constraint's type (Position, Parent, Aim...). | |
| float | Weight | Defines how much the constraint will be applied. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Computes the initial offset that is needed to keep the child's global transform unchanged when creating the constraint. | ||
| void | Sets up dependencies with the first primary prerequisite available if the parent does not tick. | ||
| EMovieSceneTransformChannel | Returns the channels to key based on the constraint's type. | ||
| FTransform | Get the current child's global transform. | ||
| FTickFunction * | Returns the handles tick function (ensuring it lives in the same world). | ||
| FTransform | Get the current child's local transform. | ||
| FTickFunction * | GetHandleTickFunction
(
const TObjectPtr< UTransformableHandle >& InHandle |
Returns the handle's tick function (ensuring it lives in the same world). | |
| FOnConstraintChanged & | |||
| FTransform | Get the current parent's global transform. | ||
| FTickFunction * | |||
| FTransform | Get the current parent's local transform. | ||
| int64 | GetType () |
Returns the constraint type (Position, Parent, Aim...). | |
| void | (Re-)Registers the constraint function and (re-)binds the required delegates | ||
| bool | If that constraint needs to be handled by the compensation system. | ||
| void | Handle active state modification if needed. | ||
| void | OnHandleModified
(
UTransformableHandle* InHandle, |
Manages changes on the child/parent transformable handle. | |
| void | |||
| void | SetChildGlobalTransform
(
const FTransform& InGlobal |
Set the current child's global transform. | |
| void | SetChildLocalTransform
(
const FTransform& InLocal |
Set the current child's local transform. | |
| void | Setup () |
Sets up the constraint so that the initial offset is set and dependencies and handles managed. | |
| void | Sets up dependencies between the parent, the constraint and the child using their respective tick functions. | ||
| void | Registers/Unregisters useful delegates for both child and parent handles. |
Overridden from UTickableConstraint
| Type | Name | Description | |
|---|---|---|---|
| UTickableConstraint * | Create duplicate with new Outer | ||
| void | Evaluate
(
bool bTickHandlesAlso |
Override the evaluate so we can tick our handles | |
| FString | GetFullLabel () |
||
| FString | GetLabel () |
Returns the constraint's label used for UI. | |
| uint32 | Returns the target hash value (i.e. the child handle's hash). | ||
| FString | GetTypeLabel () |
Returns the constraint's type label used for UI. | |
| bool | If true it contains objects bound to an external system, like sequencer so we don't do certain things, like remove constraints when they don't resolve | ||
| bool | If Active and the handles and targets are valid | ||
| bool | ReferencesObject
(
TWeakObjectPtr< UObject > InObject |
Test whether an InObject is referenced by that constraint. (i.e. is it's parent or child). | |
| void | ResolveBoundObjects
(
FMovieSceneSequenceID LocalSequenceID, |
Resolve the bound objects so that any object it references are resovled and correctly set up | |
| void | SetActive
(
const bool bIsActive |
Sets the Active value and enable/disable the tick function. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | PostDuplicate
(
bool bDuplicateForPIE |
Called after duplication & serialization and before PostLoad. | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostEditUndo () |
Called after applying a transaction to the object. | |
| void | PostLoad () |
UObjects overrides. |
Typedefs
| Name | Description |
|---|---|
| FOnConstraintChanged | Returns a delegate that can be used to monitor for property changes. |
Constants
| Name | Description |
|---|---|
| OnConstraintChanged | UTickableTransformConstraint |