This is just copied from RotateEntity(), not entirely sure if it's what you were after. X, Y, and Z's are often referential to the object in question, so moving along Z would always be forward/backward for any given thing (a camera, for example). There are commands to work with the the absolute orientation of the world though.
-
Rotates an entity so that it is at an absolute orientation.
Pitch is the same as the x angle of an entity, and is equivalent to tilting forward/backwards.
Yaw is the same as the y angle of an entity, and is equivalent to turning left/right.
Roll is the same as the z angle of an entity, and is equivalent to tilting left/right.
-
Rotates an entity so that it is at an absolute orientation.
Pitch is the same as the x angle of an entity, and is equivalent to tilting forward/backwards.
Yaw is the same as the y angle of an entity, and is equivalent to turning left/right.
Roll is the same as the z angle of an entity, and is equivalent to tilting left/right.