I''ve been working on a similar project and was wondering if anyone was able to get
something working using Jesper T''s solution?
IcarusXJ
3D Space. Moving in it...?
I did something different that solved my problem.
I don't know if this is mathematically correct but it works wonderfully.
Edited by - Greg K on September 26, 2001 11:53:36 PM
float fx;float fy;float fz;float ft; // DegToRad returns the radians of a degree (My func)// fTheta = horizontal rotation// fPhi = vertical rotationfTheta = (float)DegToRad( fTheta );fPhi = (float)DegToRad( fPhi );// FCOS & FSIN are just cos & sin with a (float) typecast.fx = FCOS(fTheta) * fVel;fz = FSIN(fTheta) * fVel;fy = FSIN(fPhi) * fVel;// This was my mistake. I just left out the other half of the vertical angleft = FCOS(fPhi);fx *= ft;fz *= ft;x -= fx;z -= fz;y += fy;
I don't know if this is mathematically correct but it works wonderfully.
Edited by - Greg K on September 26, 2001 11:53:36 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement