Transform other 3D objects by changing their orientation.
The rotation of objects depends on given Direction and Up vectors, see Orientation for details. The translation of objects is just taken from Position, and works just like normal T3DTransform.Translation. There is no scaling of 3D objects, ever.
ADir and AUp given here do not have to be normalized (they will be normalized if needed). They will be automatically fixed to be orthogonal, if necessary: when AdjustUp = True (the default) we will adjust the up vector (preserving the given direction value), otherwise we will adjust the direction (preserving the given up value).
Change up vector, keeping the direction unchanged. If necessary, the up vector provided here will be fixed to be orthogonal to direction.
This is similar to assigning Up vector using it's property setter, but different behavior happens when we need to fix vectors to have direction orthogonal to up (which must be always true). In case of assigning Up by property setter, the Direction vector is changed (if necessary, to be orthogonal to up). In case of this method, the up vector is changed (if necessary, to be orthogonal to direction).
It's good to use this if you have a preferred up vector for creatures, but still preserving the direction vector has the highest priority.
The Direction and Up vectors should always be normalized (have length 1). When setting them by these properties, we will normalize them automatically.
They must also always be orthogonal. When setting Direction, Up will always be automatically adjusted to be orthogonal to Direction. And vice versa — when setting Up, Direction will be adjusted.
Initially, they follow VRML/X3D standard vectors suitable for gravity along the Y axis. So direction is -Z (DefaultCameraDirection), up is +Y (DefaultCameraUp).
How the direction and up vectors determine transformation. See TOrientationType for values documentation.
The default value of this is determined by static variable DefaultOrientation, this is usually comfortable (because almost always you use the same Orientation throughout your game). By default it's otUpYDirectionMinusZ (matching default cameras of OpenGL and VRML/X3D).
This value determines how you should model your 3D models, like the creatures, the items, and the player weapons. Generally, it applies to every 3D model that is used as a child of this T3DOrient instance.
We don't deal with any other camera properties in T3DOrient. If you want, you can ignore this camera (you will probably do this if you use T3DOrient for creature like TCastleCreature; although camera may still have a fun usage then, for observing world from a creature view). Or you can use this camera, taking care of all it's settings, even asssigning this camera to TCastleSceneManager.Camera to allow user to directly control it (you will probably do this if you use T3DOrient for player like TPlayer; in fact, TGameSceneManager.LoadLevel does this automatically for you).