No edit summary |
(→O file) |
||
(One intermediate revision by the same user not shown) | |||
Line 18: | Line 18: | ||
'''Note:''' Vanilla DF did not calculate the camera's pitch, therefore pitch will always be set at 0. In The Force Engine, the code has been amended to calculate the pitch. | '''Note:''' Vanilla DF did not calculate the camera's pitch, therefore pitch will always be set at 0. In The Force Engine, the code has been amended to calculate the pitch. | ||
=== O file === | |||
The camera object needs to be given the following code in the level's O file. | |||
<pre> | |||
LOGIC: KEY | |||
VUE: filename.VUE camera | |||
</pre> |
Latest revision as of 05:31, 22 November 2024
Dark Forces has built-in support for transforming a camera's location and orientation with VUE files. This functionality was "discovered" when the source code was reverse engineered.
The camera in DF is normally called the "EYE object". The EYE (camera) is assigned to an object at level startup and is normally assigned to the PLAYER object, but this is not mandatory, and there are a few mods which exploit the possibility of separate PLAYER and EYE objects.
Vanilla Dark Forces does not support moving the EYE (camera) from one object to another object after level load.
How to use
In a VUE file, each keyframe for the camera has the following syntax:
camera [x-pos] [z-pos] [y-pos] [x-target] [z-target] [y-target] [roll] [lens]
x-pos z-pos y-pos
are the location (absolute) of the camera in the mapx-target z-target y-target
are the coordinates where the camera is pointing at. The camera's yaw and pitch orientation are calculated from the vector between the camera's location and its target.roll
is the camera's roll (note: rolling of the camera is not supported by DF's renderer; no matter what number is set here, the scene will always be rendered with a roll of 0)lens
is presumably meant to be a zoom factor, which is not used by the DF engine.
Examples of camera instructions can be seen in the VUE files used for the original Gromas and Detention levels.
Note: Vanilla DF did not calculate the camera's pitch, therefore pitch will always be set at 0. In The Force Engine, the code has been amended to calculate the pitch.
O file
The camera object needs to be given the following code in the level's O file.
LOGIC: KEY VUE: filename.VUE camera