-
Notifications
You must be signed in to change notification settings - Fork 17
2.3 Extensions
Note It's assumed that you've already read the LockOnTargetComponent Overview.
LockOnTargetExtensionBase is a base abstract class that can be extended to add optional features to the owning LockOnTargetComponent.

| Method | Description |
|---|---|
Initialize() Deinitialize()
|
Extension lifetime. |
Update() |
Basic Tick method. |
OnTargetLocked() OnTargetUnlocked() OnSocketChanged() OnTargetNotFound()
|
LockOnTargetComponent callbacks. |
The corresponding header file: LockOnTargetExtensions/ControllerRotationExtension.h

ControllerRotationExtension smoothly orients the owning Controller rotation to face the Target.
Designed for a vertically aligned player representation, just like ACharacter.
Tries to approximately predict the Target location using velocity.
Adds additional smoothness with fast Targets and helps to achieve 'lag-free' rotation.

The purple sphere indicates the final location for the rotation calculation.
Smoothies the Target oscillations in Actor's relative location using critically damped spring interpolation.

The purple sphere indicates the final location for the rotation calculation.
The corresponding header file: LockOnTargetExtensions/PawnRotationExtension.h

Smoothly orients the owning APawn to face the Target using UPawnMovementComponent.
The rotation speed can be adjusted using RotationRate, similar to how UCharacterMovementComponent does it.
The corresponding header file: LockOnTargetExtensions/WidgetExtension.h

Visually indicates the captured Target by attaching a widget to the Socket.
Uses WidgetComponent internally.

UTargetComponent::bWantsDisplayWidget can be used to disable indication for a specific Target.
Targets can have their own widgets.
The corresponding header file: LockOnTargetExtensions/CameraModifierExtension.h

Adds the specified camera modifier to the PlayerCameraManager.
The camera modifier will be enabled while any Target is locked, and disabled otherwise.
For more info refer to the official documentation.
LockOnTarget provides the ULockOnTargetCameraModifier_Zoom camera modifier that smoothly changes the camera FOV.
The corresponding header file: LockOnTargetExtensions/TargetPreviewExtension.h

Tries to predictively find a new Target and mark it.
