🎨
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
  • Cursor Aiming
  • Raycast Aiming
  • Aim Assist
  • Responsive Reticle
  • Cursor Target Selection
  • Turret Aiming

Was this helpful?

  1. Weapons
  2. Vehicle Setup

Cursor Aiming

PreviousVehicle WeaponsNextProjectile Weapons

Last updated 2 years ago

Was this helpful?

If you wish to control weapons functions such as aiming and target selection with the mouse cursor, add an Aim Controller component to the root transform of your vehicle.

The Aim Controller component gives you several functions to improve the gameplay experience.

Cursor Aiming

With cursor aiming, the weapons will all point toward the cursor as it moves around the screen.

To enable this, check the Cursor Aiming checkbox in the inspector of the Aim Controller component.

You must have a component set up on your vehicle. Drag it into the HUD Cursor field in the inspector of the Aim Controller component.

Raycast Aiming

In third person view, for example, the camera may be at a different height than the vehicle, making aiming the vehicle's weapons difficult. With raycast aiming, this is no longer a problem. A raycast will be fired through the cursor, and the weapons will aim at whatever it hits.

To enable this, check the Raycast Aim checkbox in the inspector of the Aim Controller component. It is highly recommended to check the Use Camera As Raycast Origin checkbox as well, as this is necessary for accurate third person aiming.

Aim Assist

With aim assist, the weapons will snap toward a target when the cursor is close to it, which means the player doesn't have to be absolutely precise, especially when aiming at a far away target.

To enable this, check the Aim Assist checkbox in the inspector of the Aim Controller component, and set the Aim Assist Angle to your liking.

For the aim assist to work properly when leading targets, you must have a Weapons component on the root transform of your vehicle. Drag it into the Weapons field in the inspector of the Aim Controller component.

Responsive Reticle

You can make the reticle change color when it is within the aim assist angle defined on the AIm Controller component.

  1. Add a UI Color Manager component anywhere on the vehicle

  2. Add all the visual elements of the reticle to it

  3. Drag it into the HUD Cursor Color Manager field in the inspector of the Aim Controller component.

  4. Customize the Aim Assist color in the inspector of the Aim Controller component

Now, when the cursor is near a target it will turn red (or whatever color you have defined).

Cursor Target Selection

If you have a target selector set up on your vehicle, you can have it select whatever target is under the cursor.

To enable this, check the Aim Target Selection Enabled checkbox in the inspector of the Aim Controller component. You will need to have a Tracker and a Target Selector already set up on your vehicle, and drag them into the appropriate fields in the inspector.

Turret Aiming

If you have turrets on your vehicle (such as on a capital ship), you will want the turrets to aim toward the position calculated by the Aim Controller.

To set this up:

  1. Create a new game object under the vehicle

  2. Drag it into the Aim Position Marker field in the inspector of the Aim Controller component.

  3. Drag it into the Turrets Target Transform field in the inspector of the Weapons component.

Now, this object will be positioned where the aim controller is aiming, and the turrets will track it.

HUD Cursor