Question About Vector Math
by Brian Wilson · in Torque Game Builder · 06/29/2011 (1:02 pm) · 3 replies
So I understand how to operate on most Vector scenarios as it pertains to TGB, including dot products and doing the math involving two vectors. But recently I was looking at some sample C++ code and saw something like this:
...where vA and vB are both vectors. Would this just be a vector scalar? Would the torquescript equiv be:
...?
float a = 2.0f * (vA) * vB;
...where vA and vB are both vectors. Would this just be a vector scalar? Would the torquescript equiv be:
%a = VectorMult(VectorScale(%vA,2),%vB);
...?
Torque Owner Alain Labrie
Ware-Wolf Games
In Torque script,