コンテンツにスキップ
出品Lock On System for UE5のメディア1

説明

Components:

This system provides two components. One component is for the Player Character. The other gets added to the Character or Other Actor you want the Player to be able to target.

The system can add various Widgets to the screen around the Targetted Actor. It can also toggle Camera Lock-On and Strafing with various settings to control how the Player and Camera / Controller will rotate and behave.

Settings:

Various Component Variables included.

  • On SetTarget: get nearest Target / nearest on-screen Target only / Target nearest to middle of screen.

  • On ChangeTarget: Target new Actor / Target another part of this Actor / Target new Actor only if there are no other parts on this Actor to Target.

  • Choose which axis (or axes) to rotate the Player or Camera / Controller around ie Yaw only or Pitch and Yaw.

  • Offset FindLookAtRotation Variable so that Target isn't obscured by Player

Aim At / Use Ability:

  • Two events that can be toggled with separate values affecting Camera FOV and Custom Time Dilation.

  • The Ability is set up to have a Maximum Duration which takes Current Time Dilation into account and can be separate from Aiming or require the Player to be Aiming first.

  • Strafing / Camera Lock can be set up to only trigger when the Player is Aiming or Using Ability.

  • Aiming / Ability can add different Widgets to the screen eg only show different Targettable Parts when Aiming.

Input:

Uses Enhanced Input System.

  • Various InputActions and MappingContexts defined with Default Mappings set up and tested for Gamepad and Keyboard/Mouse.

  • Set Target by Button or MouseOver and Click. Events to handle MouseOver of Targets and Widgets - trigger Highlight/UI Animation.

  • Change Target in Direction - Component can calculate best NextTarget from a given 2D vector, ie from Thumbstick Input or by D-pad/Arrow Keys.

  • Events to receive and handle Player Movement/Camera Look to temporarily disable Strafing or Camera Lock.

UI Options:

  • Simple Lock-On Dot

  • Target Name / Targetted Part Name

  • Post-Process Material Highlights - Uses Custom Stencil (Custom Depth: "Enabled with Stencil" must be set in Project Settings) to add separate Highlight Effects to Targetted Actor / Targetted Part and to Actor / Part under Cursor.

  • ProgressBar - Updates to show remaining time left that Player can Use Ability. Automatically fades or disappears from screen.

Example Maps:

  • First-Person - Set Target doesn't enable Camera Lock but Ability does. Allow Highlighting different parts of the mesh with Mouse Cursor if not using Gamepad.

  • Third-Person - Target is offset, and offset increases when Aiming or Using Ability.

  • Point-and-Click - Highlight and Select Targets by Mouse.

  • Tank Controls - Strafing is Disabled when Player actively inputting Movement.

含まれる形式