It’s probably not the most enticing headlining you’ve ever read, but it might be of some interest for some! I first saw this effect used in Half Life 2, where they use a flat 2D image and then use code to have it always be positioned towards the camera (so you never see it’s flat). Actually thinking about it a little more, all of the enemies in Doom were created in this way. Where as in Half Life 2 they used it sparingly and effectively, I’ve gone completely over the top and just copied and pasted like there’s no tomorrow. I’ll be a bit more subtle next time I promise. Here you can see the position change a little clearer:
In unity you need to change the image type to ‘Sprite 2D & UI’, get the Alpha Source from ‘Grey Scale’, generate Mip Maps and change the max size to something like 256. The Alpha source is important here, as that’s what removes the black background.
The C# script is very simple:
{
public GameObject player;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.LookAt(player.transform);
}
}