Vector perpindicular to a given axis?
by Kevin Johnson · in Torque Game Engine · 08/04/2004 (6:19 am) · 3 replies
I'm working on a little resource on adding normal map support to TGE using CG, To get my effecting light vector I'm using mDirection, if the
Light is near the object (mWorldSphere.isIntersecting(lightSphere)) - (borrowed from brett's stencil resource). It seems to be working but when i move the light around, the vector i'm getting back is relative to the objects center. (ie always pointing to the center of the object). Is there a quick or not so quick way to get a vector perpedicular to a given axis ?
Light is near the object (mWorldSphere.isIntersecting(lightSphere)) - (borrowed from brett's stencil resource). It seems to be working but when i move the light around, the vector i'm getting back is relative to the objects center. (ie always pointing to the center of the object). Is there a quick or not so quick way to get a vector perpedicular to a given axis ?
Associate Kyle Carter