You're looking for the dot product between the (normalized) vector pointing from particle to camera and the (normalized) vector perpendicular to the sprite.
If the sprite is facing the camera the scalar result will be 1. If it is 90-degrees to the camera the value becomes zero, and then goes to -1 when the sprite is facing away from the camera position.
On Tue, Mar 27, 2012 at 4:07 AM, Rob Chapman <tekan...@gmail.com>
quick trigonometry question, unfortunately its never been my strong point so any advice would be much appreciated., Ive had a go at trying to get clouds as sprites working and getting improved results with each test, I'm finding that a direct sprite grid align to camera does not work so well when the camera flies into or around the clouds but a randomised orientation does... but not when the angle is too extreme eg take a look at this test here http://vimeo.com/39255483 and the sprite grids that are too obtuse or acute really stand out. Iv'e had a go with an ICE tree that gives an angle between two vectors (the camera and the y axis of each particle) but don't seem to get the required results when show values is turned on. what I'd really like is that as the particle orientation approaches horizontal angle (to the camera) this gaves a scalar value/angle that I can then use to control the transparency , effectively fading it out at extreme angles or limit the orientation between certain values.. Anybody have an idea how to do this with ICE? hopefully its simple.