Sign in to follow this  
lost_jedi

Help with vectors

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this