-
Notifications
You must be signed in to change notification settings - Fork 56
Home
An UE4 plugin written entirely in C++ which adds support for a simple Dark Souls inspired Camera Lock On / Targeting system.
It was first developed and tested in Blueprints following the implementation of the people over at Lurendium, with this tutorial series: Part 1, Part 2, Part 3, and then converted and rewritten into a C++ module and plugin.
Subscribe to https://www.unrealengine.com/marketplace/target-system-component-plugin, and Hit the button "Install in the Engine" button from the Vault. Then, ensure the plugin is enabled for your project.
Download the latest TargetSystem.zip
pre-built plugin zip from the Release page for your Engine version, and drop the content in your project's Plugins
folder. Then, load up Unreal Editor, compile the plugin against your Engine version and check the Plugins page to see if TargetSystem
plugin is enabled.
Check the Setup and Installation wiki page.
-
float MinimumDistanceToEnable
: The minimum distance to enable target locked on. -
TSubclassOf<AActor> TargetableActors
: The AActor Subclass to search for targetable Actors. -
TSubclassOf<UUserWidget> TargetLockedOnWidgetClass
: The Widget Class to use when locked on Target. If not defined, will fallback to a Text-rendered widget with a single O character. -
float TargetLockedOnWidgetDrawSize
: The Widget Draw Size for the Widget class to use when locked on Target. -
float BreakLineOfSightDelay
: The amount of time to break line of sight when actor gets behind an Object. -
float StartRotatingThreshold
: Lower this value is, easier it will be to switch new target on right or left. -
bool ShouldControlRotationWhenLockedOn
: Whether or not the character rotation should be controlled when Target is locked on. If true, it'll set the value of bUseControllerRotationYaw and bOrientationToMovement variables on Target locked on / off. Set it to true if you want the character to rotate around the locked on target to enable you to setup strafe animations. -
FVector TargetLockedOnWidgetRelativeLocation
: The Relative Location to apply on Target LockedOn Widget when attached to a target.
-
void TargetActor()
: Function to call to target a new actor. -
void TargetActorWithAxisInput(float AxisValue)
: Function to call to target a new actor with Axis input, on right or left. -
OnTargetLockedOff(AActor* TargetActor)
: Called when a target is locked off, either if it is out of reach (based on MinimumDistanceToEnable) or behind an Object. -
OnTargetLockedOn(AActor* TargetActor)
: Called when a target is locked on.
MIT License.