Projectile at certain angle
by Greg C · in Torque Game Builder · 04/28/2014 (9:31 pm) · 1 replies
How would I go about getting a projectile to move at a certain angle, such as based on the rotation of a sprite? So if the sprite rotation is 37 degrees, the projectile is shot out from the sprite at 37 degrees and so on (potentially with variable speeds). Thank you.
Torque Owner Richard Ranft
Roostertail Games
Where %object is your scene object, %vecX is the x component of your unit vector, %vecY is the y component of your unit vector, and %speed is the velocity that you want it to move at.