i get stupid about a problem with my moving. normal moving works correct. what i mean is if you look a bit up an press forward you will "fly" with the given speed in this direction.
but here is the problem. i do not want to fly, i just want to run around with a constant speed on the ground without flying up to the sky if i look up. (in other words i just need the simple movement of a 3dshooter :/ )
for the normal camera movement i just do :
1.viewVec-PositionVec
2.and add the result to the current view and position vector of my camera.
but if you want real movement you can not do it like this. even if i would not modify the y positions of these two vectors (in listed point 2), there would be the problem that if you look up, the z and x distances are shrinked to a small amount. the result is the more you look up, the slower you get. (logical so far...)
i found a solution, but i am not sure why it works ( i always love such damn things

). the y of the dummyVec i calculate
is set to 0. the calculated z value will be the same negative.
or in c:
dummyVec.y = 0.0f;
dummyVec.z = -dummyVec.z;
vecNormalize( &dummyVec ); // normaizes vector
if i now add the dummyVec to my view and position vectors of the camera it works fine...
but all i do now about the normalization is that it just means to scale the whole vector to values between -1.0f and +1.0f.
Or does it do anything else?
so i think it just seems to work fine because there are only little differences ( of course between >0.0 and <1.0 ) that are little enough so that you do not recognize that the movement gets slower. but in fact this i would be able to recognize this differenc or not ( this "little" value is of course influenced by a camera speed that has an amout of 400 and the difference between 0.5 * 400 and 1.0 *400 should be seen )

warg too confusing. i just dont get it. why does everything works fine now? i need to understand it. plz help me guys i hate things i code but do nor really understand. wheres this damn trick with the normalization... warg