gl-matrix
                                
                                
                                
                                    gl-matrix copied to clipboard
                            
                            
                            
                        Vec4.transformMat4 producing weird results during projection
Hi, initialising a Vec4 using fromValues(...) produces a Vec4. However, when I multiply this by the projection matrix using Vec4.transformMat4, I get extremely weird results and cannot perform mouse picking (conversion of 3d coordinates to 2d).
My current workaround is to use Vec3.transformMat4(...) on a Vec4 array.
What sort of weird values are you seeing? I believe one of the only differences is that while vec3.transformMat4 performs the "W divide", vec4.transformMat4 does not (you must divide X, Y and Z by W to get the same values)