
This is one of the problems I encounter often. It might be useful to put solution here.
If you are in hurry or don’t need any explanation, I’ll just leave solution below.
v2 = v1 – 2(v1.n)n
v1.n is dot product & n must be normalized.
Vector3 ReflectVector(Vector3 inputVector, Vector3 normal) { float dn = 2 * inputVector.DotProduct(normal); return inputVector - normal * dn; }Continue reading How to get reflection vector?