The cinematic battle camera. What This Module Does
A Tactical battle is watched from the map's own view. This file is the director that borrows that view for a shot and gives it back: over the shooter's shoulder as it aims, a cut to the target as the hit lands, a round followed down a long sight line, slow motion on a kill.
Classes & Namespaces
C
17 functions →
D
34 functions →
Scene_Map
3 functions →
SceneManager
1 function →
Reactor3D.Camera
1 function →
Design Notes from the Source Code
A Tactical battle is watched from the map's own view. This file is the director that borrows that view for a shot and gives it back: over the shooter's shoulder as it aims, a cut to the target as the hit lands, a round followed down a long sight line, slow motion on a kill.
It listens to the battle on the runtime feed (fightAim, fightFire,
fightImpact, fightMoveStart and the rest, docs/RUNTIME-EVENTS.md) and
holds the battle through ReactorFight.Director.isBusy() while a shot
that must be seen first plays. It never changes the map's camera state:
3D map the shot is laid over the pose the map camera placed this
frame (Reactor3D.Camera.update), so giving the camera back
is to stop laying it over. The map camera keeps running
underneath in whatever mode it is in.
2D map the shot is a pan (the map's scroll) and a zoom (the screen's
zoom), both saved when the first shot starts and put back to
the saved numbers when the last one ends.
How much it cuts is one setting, System.json > reactorBattle.cinematic:
{ level: "off" | "some" | "every", slowMotion: true, skip: true }. Off
is exactly the battle without a director.
Slow motion runs the map scene's own update on a fraction of the frames (the way holding OK runs it twice), eased in and out: units, the action, 3D model animation and effects slow together; the camera, the windows and sound do not (a sound keeps its speed and its pitch).
View reactor_fight_camera.js on GitHub · Hide internal (_) functions