Question about vector math functions

Hi Folks-

I need to get the x, y and z components from some of the vectors in my simulation, so that agents can react based only on the value of, say, the x component of another agent's movement vector.

I've read through the manual, and I can't see a way to get these vector component values into int variables using the vector functions provided. I thought I might be able to use matrix multiplication to solve the problem, but I can only think of a way to do this using 1x3 matrixes, not 3x3 matrixes.

I feel like I must be missing something obvious here. Any suggestions?

Thanks!

Jen

Question about vector math functions

To get the a component of a vector, use the notation ::x, ::y or ::z

xComponent = myVector::x.

- jon

Question about vector math functions

Thanks Jon- I knew there had to be a way. Much appreciated.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.