# Help with vectors

This topic is 4856 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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 on other sites

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 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 on other sites
Thanks very much. That was very helpful

1. 1
Rutin
40
2. 2
3. 3
4. 4
5. 5

• 18
• 19
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633362
• Total Posts
3011531
• ### Who's Online (See full list)

There are no registered users currently online

×