Greetings,
I have a GPU-instancer that uses the Graphics.DrawMeshInstanced(). When I Debug.DrawRay() using the instance position and the cross product of the surface triangle, I get the correct direction of the ray, pointing upwards at a 90 degree angle from the surface.
However, when I use the vector3 cross product with the Quaternion.Euler(cross) in Matrix4x4.TRS(), the rotation does not match the Debug.DrawRay() and cross product, but instead it seems to be all over the place and I cannot seen to figure out a pattern. I want to be able to place objects that follow the cross product of the surface triangle, but I cannot find anything about this on the internets, so I have to ask here.
What am I doing wrong? Please help. ;_;