Class UUxtFollowComponent
The follow component has three different constraints that keeps its owner in front of the camera: Angular Clamp, Distance Clamp, and Orientation. The combination of Angular and Distance Clamp creates a frustum in front of the camera where its owner can be. If its owner is outside that frustum it is adjusted.
Angular Clamp: The objective of this constraint is to ensure that the reference forward vector remains within the bounds set by the leashing parameters. To do this, determine the angles between toTarget and the leashing bounds about the global Z-axis and the reference's Y-axis. If the toTarget falls within the leashing bounds, then we don't have to modify it. Otherwise, we apply a correction rotation to bring it within bounds. This will ensure that the its owner stays within the top, bottom, right and left planes of the frustum.
Distance Clamp: The objective of this constraint is to ensure that the following actor stays within bounds set by the distance parameters. To do this, we measure the current distance from the camera to the its owner. If the distance is within the MinimumDistance and MaximumDistance then we don't have to modify it. Otherwise, we push away or pull in the its owner along the reference forward vector. This will ensure that the its owner stays within the near and far planes of the frustum.
Orientation: The two options provided are constant FaceCamera or WorldLock. While world locked there are three conditions that will cause the its owner to face the camera: Angular Clamps Distance Clamps The angle between the forward vector of the its owner and toTarget vector (vector between the camera and the its owner) is larger than dead zone angle parameter
Inheritance
Namespace:
Assembly: .dll
Syntax
public: class UUxtFollowComponent
Constructors
| Improve this Doc View SourceUPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(EditCondition="!bIgnoreDistanceClamp", EditConditionHides), Category=FollowDistance)
Min distance from eye to position its owner around, i.e. the sphere radius
Declaration
public: UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(EditCondition="!bIgnoreDistanceClamp", EditConditionHides), Category=FollowDistance) float MinimumDistance
Parameters
Type | Name | Description |
---|---|---|
EditAnywhere | _u_uxt_follow_component_UPROPERTY_EditAnywhere_BlueprintReadWrite_meta_Category_ | |
BlueprintReadWrite | _u_uxt_follow_component_UPROPERTY_EditAnywhere_BlueprintReadWrite_meta_Category_ | |
meta | _u_uxt_follow_component_UPROPERTY_EditAnywhere_BlueprintReadWrite_meta_Category_ | |
Category | _u_uxt_follow_component_UPROPERTY_EditAnywhere_BlueprintReadWrite_meta_Category_ |
UUxtFollowComponent()
Declaration
public: UUxtFollowComponent()
Fields
| Improve this Doc View SourceActorToFollow
Actor that this component will follow. If null, this component will follow the camera
Declaration
public: AActor * ActorToFollow
Field Value
Type | Description |
---|---|
AActor * |
bIgnoreAngleClamp
Option to ignore angle clamping
Declaration
public: bool bIgnoreAngleClamp= false
Field Value
Type | Description |
---|---|
bool |
bIgnoreDistanceClamp
Option to ignore distance clamping
Declaration
public: bool bIgnoreDistanceClamp= false
Field Value
Type | Description |
---|---|
bool |
bInterpolatePose
Option to ignore interpolation between follow poses
Declaration
public: bool bInterpolatePose= true
Field Value
Type | Description |
---|---|
bool |
bUseFixedVerticalOffset
Ignore vertical movement and lock the Y position of the object.
Declaration
public: bool bUseFixedVerticalOffset= false
Field Value
Type | Description |
---|---|
bool |
LerpTime
Rate at which its owner will move toward default distance when angular leashing
Declaration
public: float LerpTime= 0.1f
Field Value
Type | Description |
---|---|
float |
OrientationType
Orientation Type
Declaration
public: TEnumAsByte<EUxtFollowOrientBehavior> OrientationType= EUxtFollowOrientBehavior::WorldLock
Field Value
Type | Description |
---|---|
TEnumAsByte<EUxtFollowOrientBehavior> |
OrientToCameraDeadzoneDegrees
The owner will not reorient until the angle between its forward vector and the vector to the camera is greater than this value
Declaration
public: float OrientToCameraDeadzoneDegrees= 60.0f
Field Value
Type | Description |
---|---|
float |
Methods
| Improve this Doc View SourceBeginPlay()
Declaration
protected: virtual void BeginPlay() override
Recenter()
Force the owner to recenter in the camera's field of view.
Declaration
public: void Recenter()
TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction)
Declaration
protected: virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
Parameters
Type | Name | Description |
---|---|---|
float | DeltaTime | |
ELevelTick | TickType | |
FActorComponentTickFunction * | ThisTickFunction |