🎨
UVC
  • Introduction
  • Installation
    • Installing in New Project
    • Installing in Existing Project - SCK
    • Installing in Existing Project - MCK
  • Space Combat Kit Tour
  • Mech Combat Kit Tour
  • Player Setup
  • Vehicle Framework
    • Game Agents
    • Vehicles
    • Modules
      • Module Mounts
      • Modules
      • Module Types
      • Module Attachments
      • Display Module On UI
      • Module Managers
  • Input
    • General Input
    • Vehicle Input
    • Rewired Integration
  • Player/AI
  • Spaceships
    • Speed UI
    • Space Fighters
    • Capital Ships
  • Mechs
    • Speed UI
  • Vehicle Control Animations
  • Character Enter/Exit
  • Camera
    • Camera Setup
    • Vehicle Setup
    • Secondary Cameras
    • Death Camera
  • Weapons
    • Framework
      • Triggerables System
      • Weapon System
    • Vehicle Setup
      • Vehicle Weapons
      • Cursor Aiming
    • Projectile Weapons
    • Beam Weapons
    • Missile Weapons
    • Resource Handling (Ammo/Heat)
    • Turrets
    • HUD Weapon Info
    • Health Modifier Volumes
  • Radar
    • Radar Setup
    • Target Setup
    • Target Selectors
    • Trackable Types
    • Improving Radar Performance
    • Target Notification
    • Radar Audio
  • Health
    • Health Framework
      • Health
      • Damageable
      • Damage Receiver
      • Health Modifier
      • Health Types
      • Health Modifier Types
      • Surface Types
    • Vehicle Setup
    • Damageable Object Setup
    • Detonators
    • Health Recharge
    • Health UI
    • Energy Shield
    • Damageable Module Linkers
  • HUD
    • HUD Basics
    • HUD Manager Setup
    • Custom HUD Components
    • HUD Module Display
    • Camera View Management
    • HUD Cursor / Reticle
    • Weapon UI
    • Resource Container UI
    • 2D Radar
    • 3D Radar
    • Target Boxes
    • Target Holograms
    • Minimaps
    • HUD Distance Lookup
  • Loadout
  • AI - Space Combat Kit
    • AI Setup
    • AI Spaceship Behaviours
  • AI - Mech Combat Kit
  • Game States
  • Teams
  • Floating Origin
  • Object Pooling
  • Menus
    • Creating Menus
    • Button Controllers
  • Rumbles
  • Rigidbody Characters [WIP]
  • Utilities [WIP]
    • Object Triggers
    • Shadow Caster Doubles
    • Gimbals
    • Game State Post Process Enabler
  • Objectives
  • Resources System
    • Resource Containers
    • Resource Handlers
    • Resource Container Triggers
    • Module/Vehicle Resource Usage
    • UI
  • Cutscenes
  • URP Upgrading
Powered by GitBook
On this page
  • Setup
  • Target Selection Input
  • Cursor Target Selection
  • Subsystem Target Selection
  • Target Selection For AI

Was this helpful?

  1. Radar

Target Selectors

Setup

To add a target selector to a vehicle that can select a target from the targets currently being tracked by a Tracker:

  1. Add a Tracker Target Selector component anywhere on the vehicle

  2. Open the inspector and set the Tracker field to the Tracker that's on the vehicle.

  3. If this target selector is the one used by the weapons (for target locking, target leading, etc), go to the Weapons component on the vehicle and set the Weapons Target Selector to the target selector you just added.

  4. Customize the settings in the inspector.

Target Selection Input

To set up target selection controls:

  1. Add a new game object under the Player in your scene

  2. Add a PlayerInput_InputSystem_RadarControls component

Now, when the player gets in the vehicle, the targeting controls will work on the target selector defined in the vehicle's Weapons component.

The targeting controls are set up using Unity's Input System. Open the General Input Asset input asset in the Project tab by double clicking it, navigate to the Targeting Controls section, and you'll be able to modify the input bindings there.

Currently, you can choose Next, Previous, Nearest, Front, and Under Cursor targets. Here are some code snippets you can use if you wish to control the target selector:

// Select the next target
myTargetSelector.Cycle(true);

// Select the previous target
myTargetSelector.Cycle(false);

// Select the nearest target
myTargetSelector.SelectNearest();

// Select the target in front
myTargetSelector.SelectFront();

// Select a specified target
myTargetSelector.Select(myTarget);

Cursor Target Selection

To enable cursor target selection on your vehicle:

  1. Make sure your vehicle has an Aim Controller component on it

  2. Check the Aim Target Selection Enabled checkbox in the inspector

Subsystem Target Selection

There are two ways you can select subsystems with a target selector.

First, you can go to the Tracker Target Selector component and check Select Highest Depth Child. Now, when the target selector cycles through targets, if its comes upon a target that has subsystems (child trackables) it will select the first subsystem as the selected target, and cycle through all the subsystems before going to the next target.

Alternatively, you can:

  1. Add a Subsystem Target Selector component.

  2. Go to the inspector and set the Parent Target Selector to the Tracker Target Selector you added earlier.

Now, when the Tracker Target Selector selects a target which has subsystems, the Subsystem Target Selector will be able to cycle through its subsystems.

Target Selection For AI

By default, in the demos provided in the kit, the AI attacks the target that is selected by the Target Selector that has been assigned to the Weapon component on its vehicle.

PreviousTarget SetupNextTrackable Types

Last updated 8 months ago

Was this helpful?

The Aim Controller is discussed in more depth .

here