Jump to content
  • Advertisement
Sign in to follow this  
Sigvatr

Positional and Direction Vectors in GLM

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there,

I'm using GLM as the backbone of the 3d mathematics in my game engine.

Right now I have a "mob3" class that is simply two vector3s, one for the position and another for the direction. I am having no problems rotating the mob3 or using it as a camera in OpenGL, but I am trying to figure out how to move the mob3 based on the direction it is facing.

I want to have functions for 6 generic directions in three dimensional space (forward, backward, left, right, up, down). Depending on how I implement these functions, the mob3 could move, return a new positional vector3 or mob3 based on where the current one is to move to, or both.

And I have full GLM functionality, so I could use quaternions and matrices for all this crap if I wanted to (I'm still vague on quaternions though).

Any ideas?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!