🎨
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 a Shadow Caster Double
  • Setting Up The Shadow Caster Double

Was this helpful?

  1. Utilities [WIP]

Shadow Caster Doubles

Sometimes, you may want to have one object cast shadows to represent another object.

For example, in the Mech Combat Kit, the first person view is not anchored to the mech model, because the mech model's walking animations cause far too strong and disorienting movement of the camera. Instead, in first person view, the cockpit (and weapons) are separated from the rest of the mech, where their own animations can be adjusted until the player experience is comfortable. Yet the player still must be able to see their shadows moving around as if the weapons are part of the swaggering mech model.

To do this, Shadow Caster Doubles are used for the weapons, which are invisible meshes that are attached to the mech model and cast shadows for the actual weapons that have been removed.

Creating a Shadow Caster Double

To create a shadow caster double for a weapon module (or any other module) add a Shadow Caster Double component to the weapon module's root transform.

You will need to add other mesh(es) to your module, go to their Mesh Renderer components, and in the inspector set Lighting > Cast Shadows to Shadows Only. This means the mesh is invisible but will cast shadows.

Next, drag a single gameobject that contains all the invisible meshes in its hierarchy into the Shadow Caster Double component's Shadow Caster Objects list.

Then go to the visible meshes of your module, go to the Mesh Renderer component's inspector, and set Cast Shadows to Off. This means the mesh is visible but won't cast any shadows.

Setting Up The Shadow Caster Double

Go to all the module mounts on your vehicle where a shadow caster double module may be mounted, and add a Module Mount Shadow Caster Anchor component. In the inspector, you can specify where the shadow caster double object should be placed. For a mech, this would be somewhere on the skeleton of the mech.

PreviousObject TriggersNextGimbals

Last updated 2 years ago

Was this helpful?