Simple laser/raygun effect

Old games used a simple 2d flat plane to show a laser or ray effect, but the problem is that if the camera is not side on to the plane, the effect can look bad.

The simple solution is to align the ray to the target and the camera at the same time.

I’ve also included some script to make the ray scroll and to scale the UV to match the length of the ray, so the image isn’t stretched.

laser_ray.blend (457 KB)

The next step would be to add an impact effect at the end of the ray, and maybe a muzzle flare at the start.

No image packed, but it looks cool and the demo works great.