ECSLineRenderer
ECSLineRenderer copied to clipboard
Billboard rotation is wrong
It is currently only do a look at from line to camera position, it doesn't take account of camera's rotation yet. You could see the section I commented in LineSegmentTransformSystem.cs
if you wanna try tackle this.
I experimented with introducing camera rotation, my 2 conclusions are:
- Calculate quad mesh normal from relative camera position when camera is using perspective projection
- Calculate quad mesh normal from camera rotation when camera is using orthographic projection
src: https://github.com/andrew-raphael-lukasik/ECSLineRenderer/blob/7ab537e23b266128cc5ad89c1cf5a58936a12d39/Scripts/Systems/LineSegmentTransformSystem.cs