Surface normal, and realistic reflections !!Images!!
I noticed particles don't reflect right, that is, according to the law of reflection:
So, it shall be fixed!
The dotted lines are the surface normal estimations, fire puffs the hitposition of the first raycast.
Pastebin of functional part for your convenience:
http://pastebin.com/nP8Yt8R5How the surface normal is estimated:
And how the reflection angle from original is calculated to be used by Vector:RadRotate()
Actually, it would be 90-alpha, but in radians 180 is conveniently Pi.
Because all the actors in Cortex Command are meth addicts and shake all the time, this isn't that good for beams.
The constant jittering means it'll spread all over the place.
Projectiles however, should do well.
Feel free to use this for anything you want to bounce around.