In this guide i will create a dynamic camera which will move from one position from another.
Note: This is currently only possible with the benchmark entity, which means this camera might degrade performance on your mission.
Let’s begin:
First we will borrow these:
entity{
_template:t="screen_fade_anim"
screen_fade:r=0.9
anim_track_on:b=yes
}
and
entity{
_template:t="benchmark"
benchmark_name:t="youcanwriteanythinghere"
"camera_tracks:array"{
"camera_tracks:object"{
from_pos:p3=-1420.35, 6.55075, 627.897
to_dir:p3=0,0,0
duration:r=10
to_pos:p3=-1353.6, 7.08025, 613.18
from_dir:p3=0,0,0
}
}
}
First one will make our dynamic camera move, the second stores all the neccessary information for our camera path(s).
Load the map, open it in the editor ( in my case the tutorial map i made for my conquest guide):
Now open the blk in Notepad++ or in a text editor you like, and paste the code ( save of course):
After a restart you will see the working camera:
But this was made for Moscow, we need to change the camera positions. You won’t see any entities you could drag around, as positions are stored inside the benchmark entity, not independently. So i’m going to use temporary cameras to get the x,y,z postions.
I want a simple camera that moves between the 2 windmills.
I will use this:
So we have our starting camera. Again these are not used by the dynamic cam, this can be deleted later:
And the other camera where the sequence stops/restarted:
Save the scene.
Open notepad:
Now we have the positions of our start and finish cameras.
All we have to do is copy them to the right places:
Copy this
to here:
And the other one to to_pos:
Ctrl+S, restart scene in-game ignore changes!
Now our cinematic camera is in the right place but it’s looking in the wrong direction:
Let’s rotate them.
We have 2 parameters: from_dir - Where the camera is looking at the start and to_dir: where it will be looking at the end.
Let’s rotate the cameras:
First one: (The blue line is where it will look)
Second one:
Save the scene. Open Notepad:
Copy the third set of coordinates to the right lines:
(First cam’s position is from_dir, second is to_dir)
Save the file, restart the game, and we should have the camera looking where we wanted:
You can change the duration/ speed of the camera in the properties section:
benchmark_runs
should be set to a high number like 1000 or more. Once the game completes X number of benchmark runs it will close/crash.
Scene file:
scene.zip (2,9 kB)
I currently have no idea whether this works online or not as i cannot access the sandbox portal, will be updated when i can
EDIT 1: Should not be used in Multiplayer, the fade in and out is also present in-game: