🎨
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
  • Creating The Vehicle
  • Setting Up The Player
  • Run The Scene
  • Camera Setup

Was this helpful?

  1. Spaceships

Capital Ships

PreviousSpace FightersNextMechs

Last updated 2 years ago

Was this helpful?

In this context, a capital ship is one that controls like the ships in Fractured Space or Dreadnought, where the player can freely rotate the camera to look around and aim the turrets, rotate the ship horizontally, and move forward, back, left, and right.

The SCK_CapitalShips scene provides a fully functioning demo of the capital ship if you wish to take a look.

Creating The Vehicle

If you just want to get started, you can use the CapitalShip_Friendly prefab provided in the kit.

To begin creating a new vehicle, create a new empty game object in the scene and call it whatever you wish, e.g. 'Capital Ship'. Add a Vehicle component and a Vehicle Engines 3D component.

Next, drag your capital ship mesh from the Project folder onto the empty game object so that it becomes a child of it, and make sure the local position and rotation are zero.

Setting Up The Player

If you just want to get started:

  1. Drag the Player_InputSystem_SCK prefab into the scene.

  2. Go to your new ship, open the Vehicle component, and set the Vehicle Class to CapitalShip.

OR if you are in the process of creating your own player:

  1. Create the player Game Agent as described in if you haven't already.

  2. Add a PlayerInput_InputSystem_CapitalShipControls component somewhere in its hierarchy.

Next, open the Game Agent component on the player and set the 'starting vehicle' to your new ship.

Run The Scene

Now when you run the scene, you use the WASD, Spacebar and Left Control keys to move it around, and rotate sideways with the Q and E keys.

If the controls are very sensitive, it is likely you have not set up the capital ship's Rigidbody with sufficient mass and drag. You can customize these values as well as the settings on the Vehicle Engines 3D script to customize the performance of the capital ship.

Camera Setup

The camera may not be set up yet, if not, check out this section to create a Vehicle Camera, or simply drag the VehicleCamera_SCK prefab into the scene and remove the default camera.

If you haven't already, add a Camera Target component to the capital ship's root transform, and drag the capital ship into the Starting Target Vehicle field in the inspector of the Vehicle Camera component on the camera.

Once you've done that, you'll need to set up the ship's view gimbal (joint) that allows you to rotate the camera in all directions (ignore this section if you're using the capital ship prefab provided in the kit).

To do this, add a Targeting Gimbal component to the root transform of your capital ship.

Next, do the following steps:

  1. Add a new game object as a child of the capital ship and call it 'Targeting Gimbal'.

  2. Add a new game object as a child of the targeting gimbal, and call it 'Horizontal Pivot'.

  3. Add a new game object as a child of the horizontal pivot, and call it 'Vertical Pivot'.

  4. Add a new game object as a child of the vertical pivot, and call it 'Camera View Target'. Add a Camera View Target component to it, open the inspector, and set Parent Camera On Selected to True.

Now go to the inspector of the Targeting Gimbal component you added earlier.

  1. Drag the Horizontal Pivot object you created above into the Horizontal Pivot field.

  2. Drag the Vertical Pivot object you created above into the Vertical Pivot field.

  3. Drag the Targeting Gimbal object you created above into the Targeting Gimbal Object field.

Now when you run the scene again, you will be able to control the camera rotation to look around as you fly the ship.

You may need to adjust the position of the Horizontal pivot above the ship, and pull the Camera View Target object back, to improve the position of the camera during gameplay.

this section