Hi all. I've just recently started messing around with Crystal Space. (0.98r004, in case that matters for this issue.) After finishing the "simple1.cpp" tutorial, I decided that I would try to change the camera movement style from a basic mimicry of a FPS into a bare-bones mimicry of the style found in games like Freespace. (I was aiming to start with the space button for foreward motion, and the arrow and page up-down keys for rotation of the camera along its X, Y, and Z axes.) Adding a 'rotZ' to the 'rotX' and 'rotY' variables used in "simple1.cpp" caused very wacky camera motion, likely because of some rule of matrix algebra that I have forgotten.
As such, I set out to see if I could find a replacement for the tutorial's messy handling of rotation. After a bit of digging through the documentation, I stumbled upon "CS_VEC_ROT_(direction)" and "CS_VEC_TILT_(direction)", which I figured would be what I was looking for. Upon trying these, however, I discovered that these functions didn't actually have any rotation components at all, but rather caused straffing motion, which didn't seem to make much sense. As such, I went to look at their code.
The following occurs in '/CS/include/iengine/camera.h':
#define CS_VEC_FORWARD csVector3(0,0,1)
#define CS_VEC_BACKWARD csVector3(0,0,-1)
#define CS_VEC_RIGHT csVector3(1,0,0)
#define CS_VEC_LEFT csVector3(-1,0,0)
#define CS_VEC_UP csVector3(0,1,0)
#define CS_VEC_DOWN csVector3(0,-1,0)
#define CS_VEC_ROT_RIGHT csVector3(0,1,0)
#define CS_VEC_ROT_LEFT csVector3(0,-1,0)
#define CS_VEC_TILT_RIGHT (-csVector3(0,0,1))
#define CS_VEC_TILT_LEFT (-csVector3(0,0,-1))
#define CS_VEC_TILT_UP (-csVector3(1,0,0))
#define CS_VEC_TILT_DOWN (-csVector3(-1,0,0))
As you can clearly see, each function on the top has an identical twin on the bottom. I could find no differences in the rest of the .h file. I suppose I've been going on a bit too long without a clear question, so:
1. Are the CS_VEC_ROT and CS_VEC_TILT supposed to be used for camera rotation?
2. If so, are these functions broken, or am I not using them correctly?
3. If they are not meant to be used for camera rotation, what are they used for? Are they currently working for this purpose?
4. If these functions are not meant to be used for camera rotation, do there exist functions that do for rotation what CS_VEC_FORWARD does for spatial translation?
--Thanks for any help, and apologies for such a long-winded post for what should be a simple question. ^^