View Full Version : vector from 3 angles+speed
I know opengl has the functions I need, as I can draw an object rotated on all 3 axes. However, if I want to find the velocity of an object given 3 rotations (around x,y, and z axes) and put it into a vector giving x, y, and z speeds, is there anyway to get ogl to do this for me?
should i post this in a different forum?
10-31-2005, 01:43 AM
Just calculate it yourself.
x = v * cos(theta) * cos(phi)
y = v * sin(theta) * cos(phi)
z = v * sin(phi)
Where theta and phi are the angles and v is the speed.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.