• Manual
  • API Summary
  • About
Show / Hide Table of Contents
  • Introduction
  • Changelog
  • Tutorial
  • Netcode
  • Input
  • Camera Controller
    • Free Look
    • Follow
    • Over the shoulder
    • Lock-On
  • Ignoring entities

Lock-On feature

The Lock-On feature enables the camera to focus on a target. On a certain input, the system will make an overlap cast and filter for any hits that have a TargetableCustomTag, encoded in PhysicsCustomTags. To make an object targetable, add a TPC_Targetable_Authoring. Additionally, targets can be cycled with 2 defined keys for previous/next.

These are the available options: LockOn

Basic settings

  • Cast Radius

    The radius that will be used for the overlapCast to determine possible targets in range.

  • Rotation Speed

    How fast the camera should align to the locked-on target.

  • Default Offset

    Applies an additional vector to the target position for the camera to focus on. In case a TPC_TargetableOffset_Authoring has been set, the default offset will be ignored.

  • Normalize Height

    When enabled, the direction to the target will just be on the X/Z plane and any height differences will be ignored.

  • Disable Time

    The default time in seconds the system will disable 'Smooth Pivot' when the player has input in FreeLook.

Targetables sorting settings

  • Default Distance

    A default distance value to handle targetables sorting. Increase when game world and distances are very large.

  • Angle Weight

    A weight value to handle targetables sorting. Increase to prefer angles over distance.

  • Distance Weight

    A weight value to handle targetables sorting. Increase to prefer distance over angles.

Extra settings

  • Forward from target

    Use the forward vector of the target to find the nearest Targetable. Default is the camera forward vector.

In This Article
Back to top Generated by DocFX