Wind Trails for URP - Documentation


Here you can find everything about this Asset.
Download simplified version.

Compatibility

This Asset was made for the Universal Render Pipeline.
Works with Unity 2019+
Tested with Unity 2019.4.39f1 w/ URP v7.7.1.
Tested with Unity 2021.3.2f1 w/ URP v12.1.6.

Asset Contents

  • Wind Trails URP
    • WindTrails
      • WindTrailArea.prefab: Already set-up WindTrailArea to simply drag & drop into the scene.
      • WindTrailCopy.prefab: TrailRenderer that gets copied for each trail.
      • WindTrailMaterial.mat: Material for the TrailRenderer.
      • Scripts
        • WindTrails.cs: Main Script used to create a WindTrailArea to render and update trails.
        • WindTrailChild.cs: Script attached to trails to detect collisions.
    • Editor
      • WindTrailsEditor.cs: Script used to modify the Inspector Editor.
    • DemoScene
      • DemoScene.unity: Example Scene with 4 different WindTrailAreas already set-up.

Trail Setup

Locate the WindTrailArea.prefab

Assets/ Wind Trails URP/ WindTrails/ WindTrailArea.prefab.

Drag & Drop the prefab to your Scene

Create a new GameObject

The WindTrail area needs a parent object to spawn the trails.

Done

Now the area is set-up correctly.
You can now start editing the trails.

Trail Settings

References


  • Original Trail: Original trail that is copied for each trail.
  • Trail Parent: Parent for the trails in which the trails will be created as children.

Editor


  • Show Tooltips: Show information when hovering settings.
  • Draw Gizmos: Draw Gizmos of the trails in the editor.
  • Run In Editor: Create and update trails in the editor.

Visualization


  • Sorting Layer: Sorting Layer used by the trail renderer.
  • Trail Width: Width used by the trail renderer.
  • Trail Color: Color gradient used by the trail renderer.

Spawn Point


Use Focus Point: Change center to a different Transform.
  • Focus Point Transform: Transform used as center.
  • Focus Point Offset: Color gradient used by the trail renderer.
  • Focus Point Radius: Color gradient used by the trail renderer.
  • Focus Point Use Direction: Color gradient used by the trail renderer.
Spawn Radius: Radius of the spawn area around current position.
Spawn Out Of View: Radius of the spawn area around current position.
Out Of View Planes: Camera frustum planes used.

Movement


Movement Mode: Type of movement of the trail.
  • Move Towards Direction: Move the trails towards a direction.
  • Move Away From Direction: Move the trail away from the direction.
  • Direction: Direction which the trail utilizes.
  • Move To Center: Move the trail towards the center.
  • Move Away From Center: Move the trail away from the center.
  • Move Around Center Clockwise: Move the trail clockwise around the center.
  • Move Around Center CounterClockwise: Move the trail counterclockwise around the center.

Constraints


  • Contain In Radius X: Stop the trail from escaping area in the X Axis.
  • Contain In Radius Y: Stop the trail from escaping area in the Y Axis.
  • Contain In Radius Z: Stop the trail from escaping area in the Z Axis.
  • Stop On Collision: Stop the trail when colliding against something.
  • Max Trails At Once: Maximum amount of trail renderers.

Deviation


Deviation X: Deviation amplitude in the X axis.
  • Randomize: Randomize amplitude.
  • Speed: Speed of the wave.
  • Acceleration / Deceleration: Acceleration / Deceleration of the wave.
Deviation Y: Deviation amplitude in the Y axis.
  • Randomize: Randomize amplitude.
  • Speed: Speed of the wave.
  • Acceleration / Deceleration: Acceleration / Deceleration of the wave.
Deviation Z: Deviation amplitude in the Z axis.
  • Randomize: Randomize amplitude.
  • Speed: Speed of the wave.
  • Acceleration / Deceleration: Acceleration / Deceleration of the wave.

Speed & Time


  • Trail Speed: Speed of the trail movement.
  • Trail Time: Time that the trail can move before stopping.
  • Spawn Time: Time that it takes to spawn the next trail.