Translating a rotated model.
Posted by ericg on Sep 30, 2014; 4:58am
URL: https://forum.jogamp.org/Translating-a-rotated-model-tp4033250.html
Hello, This problem is a bit difficult to describe and it is not directly related to JOGL (more of a general 3D programming issue) but since I'm using JOGL I'm hoping there is an exposed openGL function or something that will help me.
What I'm trying to do is rotate a model around a fixed point (can-do no problem) and then translate it along a fixed vector - (can't-do big problem...).
So, if 0,0,0 is my rotation point I need the model to rotate around this point wherever it may be located on the screen. Then, I need it to translate directly North or South or East or West regardless of the orientation of the model. Currently, if I rotate the model around the FIXED point 45deg 'left' when I translate in the z direction the model will move North-East. I need it to maintain its orientation but move directly North.
I have my own rotation and translation functions that have been doing a great job for me so far but it looks like I might need some other construct to accomplish my goal here. Any help or suggestions would be greatly appreciated.