Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  

Positional and Direction Vectors in GLM

This topic is 2938 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?


Share this post

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

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!