(Created page with "In vanilla Dark Forces, the camera ("EYE") is usually attached to the same object as the PLAYER, meaning that the level is viewed from the perspective of the player. It is possible for the camera to be placed on a non-player object, allowing for a third-person rather than first-person experience -- this is exploited in some mods (eg. Dark Tide, Enter the Kell Dragon). TFE now allows the camera to be moved to a different object at any time during gameplay. This allows fo...") |
(Move by INF) |
||
Line 7: | Line 7: | ||
See also: [[VUE Camera transforms]] | See also: [[VUE Camera transforms]] | ||
There are two ways to move the camera: via INF, or via ForceScript. | |||
The camera (Eye) can be moved to any kind of object: a Spirit (invisible), an enemy, a scenery, a 3DO, etc. Be warned that if the object is destroyed while the camera is on it (eg. the enemy is killed) the game will crash. | |||
== Moving the camera with INF == | |||
The first step is to designate an object as a camera. This is done in the O file by using the new keyword <code>CAMERA</code> as follows. | |||
<pre> | |||
CLASS: 3D DATA: 0 X: 160.00 Y: -18.00 Z: 332.00 PCH: -25.00 YAW: 90.00 ROL: 0.00 DIFF: 1 | |||
SEQ | |||
CAMERA | |||
SEQEND | |||
</pre> | |||
A new CAMERA message has been added to INF. It can be sent the same way as other messages, either from a trigger or from an elevator stop. The following example shows it being sent from a trigger. | |||
<pre> | |||
item: line name: room1 num: 2 | |||
seq | |||
class: trigger standard | |||
event_mask: 16 | |||
client: camsec2 | |||
message: CAMERA | |||
seqend | |||
</pre> | |||
When the message is sent: | |||
* If the camera is currently on the player, the game will search the target sector ("camsec2" in this example) for a camera object. When it finds one, it will move the camera to that object. If no camera object is found in the target sector, nothing will happen. | |||
* If the camera is currently ''not'' on the player, the camera will be moved back to the player. |
Revision as of 04:55, 2 September 2025
In vanilla Dark Forces, the camera ("EYE") is usually attached to the same object as the PLAYER, meaning that the level is viewed from the perspective of the player. It is possible for the camera to be placed on a non-player object, allowing for a third-person rather than first-person experience -- this is exploited in some mods (eg. Dark Tide, Enter the Kell Dragon).
TFE now allows the camera to be moved to a different object at any time during gameplay. This allows for various effects such as
- Being able to look through security cameras
- Better in-game "cutscenes" / cinematic sequences
- The ability to switch between first-person and third-person perspectives
See also: VUE Camera transforms
There are two ways to move the camera: via INF, or via ForceScript.
The camera (Eye) can be moved to any kind of object: a Spirit (invisible), an enemy, a scenery, a 3DO, etc. Be warned that if the object is destroyed while the camera is on it (eg. the enemy is killed) the game will crash.
Moving the camera with INF
The first step is to designate an object as a camera. This is done in the O file by using the new keyword CAMERA
as follows.
CLASS: 3D DATA: 0 X: 160.00 Y: -18.00 Z: 332.00 PCH: -25.00 YAW: 90.00 ROL: 0.00 DIFF: 1 SEQ CAMERA SEQEND
A new CAMERA message has been added to INF. It can be sent the same way as other messages, either from a trigger or from an elevator stop. The following example shows it being sent from a trigger.
item: line name: room1 num: 2 seq class: trigger standard event_mask: 16 client: camsec2 message: CAMERA seqend
When the message is sent:
- If the camera is currently on the player, the game will search the target sector ("camsec2" in this example) for a camera object. When it finds one, it will move the camera to that object. If no camera object is found in the target sector, nothing will happen.
- If the camera is currently not on the player, the camera will be moved back to the player.