In this tutorial we’ll set up a separate camera control for grid battles.
This tutorial is part 8 of a mini-series covering grid battles. You can find the start of this series here.
The current camera works great for the field or regular battles, but in grid battles it’d be better to have more control and overview of the battle. Luckily, ORK allows you to set up multiple camera controls and switch between them as needed.
We’ll add a new camera control setup using the Top Down Border camera control, allowing panning and zooming.
This tutorial is based on the ORK 4 Unity Quickstart 3D tutorials and using a phase battle system, but can be used in any project and with any battle system.
Camera Control Setup #
Open the ORK editor and navigate to Controls > Camera Controls.
The quickstart 3D tutorials already had a setup using the Top Down Border camera control – well copy it and build upon it for our grid camera controls.
Copy Camera Control 0 and change the settings of the newly added Camera Control 1.
Panning Settings #
We’ll add panning using input keys – we’ll use the same input that’s usually used for movement.
- Use Panning In
Select: Battle - Reset On Target Change
Enable
The panning will reset when the camera changes it’s target. - Use Axis (Horizontal Panning Axis)
Enable - Axis Key (Horizontal Panning Axis)
Select: Horizontal Move - Use Axis (Vertical Panning Axis)
Enable - Axis Key (Vertical Panning Axis)
Select: Vertical Move - Center Key
Select: Menu
We don’t use the menu input key during battle, so we can just reuse it for resetting back to the center.
We’ll also limit panning to a defined distance from the current camera target. The default setup should work fine for now.
- Limit Panning
Enable - Distance Limit Battle
Set to: 20
If you want, you can also set up Screen Edge Panning (i.e. pans when the cursor gets near the edge of the screen) or Cursor Drag Panning (i.e. click-dragging to pan).
Zoom Settings #
The setup from the quickstart 3D tutorials already used zooming, but only to have a different zoom in the field and in battles.
We’ll adjust that to give the player control over the zoom distance.
- Use Zooming In
Select: Battle - Use Scroll Wheel
Enable - Reset Zoom Key
Select: Menu
We’ll also reset zoom with the same input key.
The Height Settings are used to define the min and max height zooming can use.
- Min Height Battle
Set to: 3 - Max Height Battle
Set to: 20
The Distance Settings are used to define the min and max distance zooming can use. Height and distance are controlled separately to allow for different zooming angles, we’ll use this to get more of a birds-eye view when zooming out.
- Min Distance Battle
Set to: 5 - Max Distance Battle
Set to: 10
Control Target Transition #
We’ll transition the position and rotation of the camera when the camera target changes.
While the overall camera controls can define transitions, each camera control type can override them with a custom setup. We’ll use this to only have the transitions active in our battle camera setup.
- Own Transition
Enable - Use Transition
Enable - Transition Time (s)
Set to: 0.5 - Use Position
Enable - Interpolation
Select: Quadratic In+Out - Use Rotation
Enable - Interpolation
Select: Quadratic In+Out
Save Changes #
And that’s it for the camera control setup.
Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.
Updating Battle Start Schematic #
The new camera control is set up, but the game is still using camera control 0. So, we need to tell it to switch camera controls at the start of our grid battles.
Open the schematic editor and open the BattleStartGrid schematic.
The updated schematic will look like this.
Change Camera Control #
Add Node > Input > Change Camera Control
This node is used to change to one of the defined camera control types.
We add this node before unblocking camera controls, i.e. the Change Music node’s Next slot is connected to this node and this node’s Next slot is connected to the Block Camera Control node.
- Camera Control Type Index
Set to: 1
And that’s it, click on Save Schematic to save the changes we’ve made.
Updating Battle End Victory Schematic #
We still need to reset the camera control to the original type at the end of the battle. We only have to do this for the BattleEndVictory schematic, since the defeat schematic causes game over, which automatically resets the controls.
Also, we don’t need to save this as a separate grid battle variant of the schematic. Resetting the camera control type is only done if it was changed, so adding it to the regular battle end schematic that’s used by other battle systems doesn’t affect them.
Open the BattleEndVictory schematic.
Change Camera Control #
Add Node > Input > Change Camera Control
Simply add the node right after the Settings node, it’s Next slot connects to the Change Music node (playing victory music).
- Reset
Enable
And that’s it, click on Save Schematic to save the changes we’ve made.
Testing #
With our new camera control set up, hit play and start a battle.
We can pan around, zoom in and out and camera target changes cause the transition – looks great!
The grid tutorial mini-series will continue!



