Skip to content

TapuGithub/unity_coneofsightfx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commandos cone of sight in Unity3D

This project shows how to implement Commandos cone of sight fx in Unity3D.

This effect is also present in other games such as Desperados, Shadow Tactics or Brawl Stars.

It is implemented using a secondary camera depth texture instead of raycasting. This camera is attached to the soldier, which allows the effect to be accurate in terms of what the character could actually see.

The cone angle can be tweaked on the ConeOfSightRenderer component (which is on the ConeOfSight object, in the Soldier prefab).

The shader works like a deferred decal so this effect would work with different terrain heights if the cube (rendered by ConeOfSight) is tall enough.

Cone of Sight demo

Assets

ToonSolider WW2 by PolygonBlacksmith

Tank by Game-Ready Studios

Oil Tank by Rakshi Games

Industrial Building by ReinforcedCC

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 56.1%
  • HLSL 28.7%
  • ShaderLab 15.2%