Unity Top-Down Vision

August 12, 2025 ยท View on GitHub

Groza Games Top-Down Vision is a powerful raycast-based solution for implementing line of sight visualization in top-down games. Create realistic vision cones and fog of war effects with this Unity package.

Unity Version URP Compatible License

Image Sequence_001_0000

โœจ Features

  • Real-time Line of Sight: Dynamic vision calculation using raycast technology
  • URP Integration: Seamless integration with Unity's Universal Render Pipeline
  • Customizable Vision Effects: Multiple render features for different visual styles
  • Performance Optimized: Efficient rendering pipeline designed for top-down games
  • Easy Setup: Simple component-based architecture for quick implementation

๐Ÿš€ Getting Started

Prerequisites

  • Unity 6000.0 or later
  • Universal Render Pipeline (URP)

Installation

  1. Clone or download this repository
  2. Copy the package contents to your Unity project's Packages folder
  3. Or add via Unity Package Manager using the Git URL:
    https://github.com/aleverdes/unity-top-down-vision.git
    

๐Ÿ”ง Setup Instructions

1. Camera Setup

  1. Create Vision Camera:

    • Create a new camera as a child of your main camera (perspective or orthographic)
    • Name it VisionCamera
    • Attach the VisionCamera script component
  2. Setup Target Camera:

    • Add the VisionTargetCamera script to your main game camera

2. Character Setup

  1. Add Vision Origin:
    • Attach the VisionOrigin script to your main character/player
    • This component acts as the source of the line of sight vision

3. URP Renderer Settings

Configure your URP Renderer asset by adding the following render features in order:

  1. Vision Black World Render Feature
  2. Vision Effect Render Feature
  3. Vision Blur Render Feature

Note: The order of render features is important for proper visual output.

๐Ÿ“ Package Structure

โ”œโ”€โ”€ Materials/           # Material assets for vision effects
โ”œโ”€โ”€ Scripts/
โ”‚   โ”œโ”€โ”€ MonoBehaviours/  # Core vision components
โ”‚   โ””โ”€โ”€ URP/
โ”‚       โ”œโ”€โ”€ MonoBehaviours/      # URP-specific camera components
โ”‚       โ””โ”€โ”€ RenderFeatures/     # Custom URP render features
โ””โ”€โ”€ Shaders/            # Vision effect shaders and shader graphs

๐ŸŽฎ Usage

Once setup is complete, the vision system will automatically:

  • Calculate line of sight from the character's position
  • Render vision effects based on the configured render features
  • Update vision dynamically as the character moves

๐Ÿงช Compatibility

  • Tested on: Unity 6000.0+
  • Render Pipeline: Universal Render Pipeline (URP) only
  • Platforms: All platforms supported by Unity and URP

๐Ÿ› Support & Issues

If you encounter any issues or need support:

  1. Check the Issues page for existing reports
  2. Create a new issue with detailed information about your problem
  3. Include Unity version, URP version, and error logs if applicable

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for:

  • Bug fixes
  • Feature improvements
  • Documentation updates
  • Performance optimizations

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ† Credits

Developed by Groza Games


Good luck with your top-down vision implementation! ๐ŸŽฏ