Game Development Community

2D Vector classes/functions in Torque Script (TGE)?

by ChrisG · in Technical Issues · 10/01/2007 (3:12 pm) · 1 replies

I'm trying write a script function to project one vector onto another in 2D.

The equation I'm trying to code is:

n ((v.n) / (||n||^2))

where v & n are 2D vectors.

Are there any 2D vector classes or functions in TorqueScript to help me do this or
do I need to build the functions from scratch?

#1
10/01/2007 (3:26 pm)
Export a new console function, trivial.

if you look thru the already provided vector functions available, and do not find it.
that will be your solution.