Game Development Community

Direction Variable?

by Colin Aitken · in Torque Game Engine · 07/20/2008 (1:33 pm) · 2 replies

Is there a "direction" type variable for projectiles, so that if I change it I can change the direction of the projectile?

Sorry I've been asking a lot of questions recently, but if there is one of these I will be done asking for a while.

#1
07/20/2008 (1:59 pm)
The direction the projectile travels in is it's velocity vector. To see a good exmaple of this, take a look at the crossbowImage::onFire function for the crossbow included with starter.fps. It fires the projectile in the direction of the weapons %muzzleVector by multiply %muzzleVector by %muzzleVelocity
#2
07/20/2008 (2:55 pm)
Thanks. I am finally done with my questions (I came to torque from other languages and I am trying to figure out similarities and differences.)