hello marius
thanks for the hint. my first try went also in this direction, but i had troubles to understand what is really happening. but after reading your mail, i tried this approach again and it turned out, that this much easier than what i was trying to before by rotating and translating the whole world around me. now there is no more conversion needed from angles to a vector, because the moving of the and the direction use the same vector, so that one is looking is always into the same direction where one is moving.
the challenge now is to find a way to create a sensefull joystick control.
roman
On Fri, 2007-02-23 at 14:46 -0500, marius schebella wrote:
what you want to do is change the perspective, resp. view. have a look at the help patch for gemwindow. I am working on a better help patch, because it took me a long time to figure out, what means what...
marius.
Roman Haefeli wrote:
hello everyone
i am working on a gem-patch. i want to make the user feel like flying freely through the 3d-space (what an ugly old-schooled sentence, i know ;-). the problem i have is, that when i rotate the world, i would like the user to fly in the same direction, so that when moving the vanishing point stays in the middle of the gemwin to create the feeling of always looking forward. in other words, i need to 'translate' the rotation done with [rotateXYZ] by the three axes X, Y and Z to a vector {x,y,z}, so that the user flies in the same direction as he is looking to.
i was told that what i want to achieve is done with a matrix, but unfortunately my mathematical knowledge is far from being able to set it up myself.
examples: the user is looking to: vector to translate ('move'):
angle X = 0° Vx = 0 angle Y = 0° Vy = 0 angle Z = 0° Vz = 1
angle X = 0° Vx = -1 angle Y = 90° Vy = 0 angle Z = 0° Vz = 0
angle X = 90° Vx = 0 angle Y = 0° Vy = 1 angle Z = 0° Vz = 0
how can i compute the correct vector for any set of angles?
sorry for any inconvenience because of terms that might be used in the wrong way. i am not a mathematician and i hope, it is still clear, what i want to achieve.
many thanks in advance for any help.
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de