View Full Version : flying objects in 3d world
02-07-2001, 10:48 PM
I want a sphere to fly from the camera strait forward. I use the glTranslatef and glRotatef functions to set the camera position. The screen is updated using sinus and cosinus functions.
I kept trying but couldnt manage to make a function for the sphere.
Can someone help please!
IF you have camera organized your camera like eye, pitch,yaw and roll, it simple to get the vector in wich the camera is looking.
If you use the eye - target way just normalize the target coords after translating the camera in 0 and you get the vector in wich the caemra is looking.
Just use this vector for the sphere movements.
02-08-2001, 03:08 AM
Yes thats a good solution, just one thing, what shall i use as target vector?
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.