Transforming a vector

Hi, i have it almost working, i guess i’m missing a little thing about transformations or something… i’m poor at math and that could probably be the reason. Well, read this (just to be SURE that’s right).

  • Transforming light vector (world space) into object space -

lightPos(0.0, 1.0, 1.0);
zeroVector(0.0, 0.0, 0.0);

I translate my world by -lightPos so the light stays on (0.0, 0.0, 0.0), maybe the name lightPos isn’t the name i should use, but you get it. So i’m transforming lightPos(0.0, 1.0, 1.0) which is in world space to object space in this way:

newLightPos = zeroVector - (-lightPos);
// OR
newLightPos = zeroVector + lightPos;

Is this vector well transformed ? If don’t, kick me

Thanks, bye