How can I get the reflection vector of a Line Trace?
I could find no nodes for it so it is probably a complex math calculation I have to do?
Hi ,
This is something that will require a bit of math, but the formula for what you are attempting to get can be found here:
http://www.3dkingdoms.com/weekly/weekly.php?a=2
Additionally, you can find a wealth of information on mathematical formulas in our math hallway content example:
Ok, I doubt I get that formula translated into Blueprint like that. Off to the Math Hallway I am, probably the only Hallway that doesn’t look spectacular, at all.
Hi ,
While you will need to modify it to fit your specific needs, this formula can be translated in a similar fashion to the image below:
Note: This is hastily thrown together for the sake of an example. Basically what it does is take the forward vector (v) of the object you want to get the reflect vector of, then performs a dot product of that vector and the normal of the hit location (n). This is multiplied by 2, then by the normal of the hit location again. After this the forward vector is subtracted from the forumla to get the reflect vector (r).