Help with vectors

Started by
3 comments, last by lost_jedi 18 years, 8 months ago
Hi, :) I have recently been working on a very simple physics engine in (dare i say it) Visual Basic for OpenGl. (I can read C++) As I am a complete noob at 3D maths please go slow and simple :P What I want to do is to be able to 'fly' and rotate an object (an aeroplane mesh) round a 3D world, i don't care about gravity or anything like that at the moment, I just want to understand the math behind the more elementary things before i move onto stuff like gravity Atm the vectors i have on my object are: Position (x,y,z) SpatialRotation (x,y,z) Momentum (x,y,z) Would it be easier to do this using quaternions? If so could you please explain how or show me some good links. Thanks in advance :) ~John
Advertisement
No quaternions necessary - you can do it with matrices, or even just vectors. It's a fair amount to explain in a post, but I do have a tutorial OpenGLObject class that might be helpful. I'd be glad to post it if you'd like.
thanks for the quick reply,

Yea that would be great. :) thankyou very much


I redid my ship class to use vectors similar to that of a camera, and that does what i want (ish) but i can't seem to find a way to make the model's spatialrotation come up with the correct angles... hmmm this class tutorial of yours will be most handy. Thanks!
You can find the class in this thread. It doesn't use Euler angles for 6dof motion, so if you're looking for an example of that you may have to look elsewhere. However, IMO Euler angles are not a good choice for that kind of motion.
Thanks very much. That was very helpful

This topic is closed to new replies.

Advertisement