Essentials Series/Cameras: Difference between revisions

no edit summary
Battlepedia>Igorseabra4
(Created page with "{{EssentialsSeriesBox}} This page is part of the Essential Series modding tutorials. A '''camera''' (CAM) is a base asset that can move the game's vie...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3:
 
== Using a Camera ==
[[Industrial Park (level editor)|Industrial Park]] has a Camera [[../Asset Templates/|template]]. This is not the type of camera used in Scooby, but a static camera which you can switch to using [[../Links/|events]].
 
After placing the camera template, open its [[../Editing Assets/#Asset Data Editor|Asset Data Editor]]. Industrial Park allows copying the editor's view position and direction directly onto a camera. Move the editor's view to the position where you want the camera to be. Click on the "Get View Position" and "Get View Direction" buttons to copy the view to the camera. Now, to use the camera ingame, you must send events to it.
 
To switch to a static camera, send the '''StartConversation''' and '''Switch''' events to it at the same time. Usually, this is done in a [[../Timers/|timer]] which runs for how long you want the camera to act, but can be sent by any other asset. When you're done using the camera, send '''EndConversation''' to it and the view will switch back to the player. If you're using a sequence of multiple cameras, which is also quite common, you need to send StartConversation and Switch to the first one, and only Switch to the rest. Send EndConversation to the last one.
 
It's common for, during this cinematic view, control to be taken off from the player. Otherwise, the player will be able to move, in many cases without even seeing what they are doing because the camera is elsewhere! To prevent this, send the '''ControlOff''' event to the SPONGEBOB [[PLYR]] asset when the cinematic starts, and '''ControlOn''' when it ends.
 
You can also change the camera's field of view in the Asset Data Editor. If you want an even more accurate preview of the camera, set IP to windowed mode, use Display -> UI Mode Autosize to set the window's aspect ratio to the same as the game. Click on View (in the Archive Editor) with a camera selected to place the view in the exact position of the camera. The [[../Industrial Park Basicsbasics/#View Config|View Config]] window allows you to change the editor's field of view. You can test values for it in the editor and then use the same one in the camera. This allows you to see exactly how the camera would look in the game.
 
[[Category:Modding]] [[Category:Tutorials]]