Except the sites demo source code link is broken. Can anybody tell me how to build the right vector by hand?e largest, then the major axis is X, the same applies for the Y and Z components. Calculating the Right vector seems easy, but there is one problem with this calculation. When the face normal is equal to the major axis the result of the cross product between them is (0, 0, 0), not what we want. The solution to this problem is a simple one. When the face normal is equal to the major axis, the Right vector needs to be built by hand. Building the Right vector by hand is very simple, see the demo source code if you are unsure about how to build it.
bulding a triangles right vector
bulding a triangles right vector
I am following the code here http://www.flipcode.com/archives/Decals_Explained.shtml to do a decal. I am getting (0, 0, 0) for my right vector and I am doing it just as explained in the tutorial. The tutorial says: