🎨
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
  • Create Mech
  • Setting Up The Player
  • Animating The Mech
  • Independent Legs

Was this helpful?

Mechs

Create Mech

Set Up Character Controller

  1. Create a new game object and add a Vehicle component

  2. Drag your mech mesh/armature onto the game object as a child

  3. Add a Rigidbody Character Controller component

  4. Add a Gimballed Vehicle Controller to the mech's root transform

Set Up Torso Joint

  1. Create a new game object as a child of the mech and call it 'Torso Gimbal'

  2. Add a Gimbal Controller component to it and drag it into the Gimbal Controller field in the inspector of the Gimballed Vehicle Controller component you added above

  3. Add a new game object as a child of the Torso Gimbal and call it 'Horizontal Pivot'

  4. Add a new game object as a child of the Horizontal Pivot and call it 'Vertical Pivot'

  5. Open the inspector of the Gimbal Controller and set the Horizontal Pivot in the inspector to the Horizontal Pivot object you created, and the Vertical Pivot to the Vertical Pivot object you created

Setting Up The Player

  1. Create a new game object and call it 'Player'

  2. Add a Game Agent component and make sure the Is Player checkbox is checked

  3. Add a new game object as a child and add a MCKPlayerInput_InputSystem_MechControls component to it

  4. Open the inspector of the Game Agent component and drag the mech you created above into the Starting Vehicle field

Now, when you play the scene, you can control the mech, but there are no animations, and the torso will not follow the mouse.

Animating The Mech

Torso Control

To set up the mouse control of the torso:

  1. Open the inspector of the Gimballed Vehicle Controller component on the mech

  2. Add an element to the Followers list

  3. Set the Follower to whatever gameobject or bone controls the torso's rotation, and set the Target to the Vertical Pivot game object you created above.

Now, the torso will follow the joint as it is controlled by the mouse.

Character Animations

  1. Add a Rigidbody Character Animations component to the mech

  2. Automatically, entries should be created for the Parameter Receivers in the inspector, with references to the Animator on your mech mesh/armature

Animator Override Controller

To make it easier to utilise the setup provided in the kit rather than having to build your own animator controller from scratch, use an animator override controller.

  1. Create a new Animator Override Controller in the Project tab by right clicking > Create > Animator Override Controller

  2. In the inspector, set the Controller to the MechController_Titan animator controller provided in the kit

  3. For each of the animations that appear in the list, set the Override to whatever animation you want to use to replace it

  4. Drag the Animator Override Controller you just created into the Controller field on the Animator on your mech mesh/armature

  5. On the Animator, make sure Apply Root Motion is unchecked

Now, when you play the scene, you should have full movement, torso control, and animations.

Independent Legs

To make the legs independently controlled (like MechWarrior) check the Independent Legs checkbox in the inspector of the MCKPlayerInput_InputSystem_MechControls component on the player.

PreviousCapital ShipsNextSpeed UI

Last updated 12 months ago

Was this helpful?