Help with vector components
by Andross · in Torque Game Builder · 12/17/2006 (12:24 pm) · 2 replies
I've just started with the TGB trail and don't have a whole lot of experience with object-oriented languages like Torque Script. I use MEL (Maya Embedded Language) quite extensively and am trying to figure out how to do somethings I've done in with with Torque.
Right now I'm trying to get the sign of the X component in a vector and I can't seem to find any methods to get this, nor even how to work get the value of a single vector component. Any help would be appreciated.
Right now I'm trying to get the sign of the X component in a vector and I can't seem to find any methods to get this, nor even how to work get the value of a single vector component. Any help would be appreciated.
Torque Owner Brian Hill
To get one of the components, use the standard 'getWord' substring accessors, like this:
There are several variations, such as 'getWords' to return multiple components, etc...