ECSLineRenderer icon indicating copy to clipboard operation
ECSLineRenderer copied to clipboard

Billboard rotation is wrong

Open 5argon opened this issue 5 years ago • 2 comments

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.

5argon avatar May 29 '19 10:05 5argon

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

andrew-raphael-lukasik avatar Jul 27 '20 22:07 andrew-raphael-lukasik

src: https://github.com/andrew-raphael-lukasik/ECSLineRenderer/blob/7ab537e23b266128cc5ad89c1cf5a58936a12d39/Scripts/Systems/LineSegmentTransformSystem.cs

andrew-raphael-lukasik avatar Jul 30 '20 20:07 andrew-raphael-lukasik