CameraController ​
Inherits: Node3D
Moves the camera of the player: it holds the current camera logic, the camera socket and the camera, and a remote transform that follows the camera for the mini map and the weather. It sets the camera to a position (with or without a pan), gives the view yaw and zooms the map.
Variables ​
bool | camera_can_process | false |
CameraLogic | current_camera_logic | |
Node3D | camera_socket | |
Camera3D | camera | |
RemoteTransform3D | minimap_transform | |
DirectionalLight3D | mini_map_light | |
RemoteTransform3D | weather_transform | |
CameraLook | look |
Methods ​
void | legacy_input( event: InputEvent ) |
void | set_camera_position( target: Variant, use_pan: bool = true ) |
float | get_view_yaw() |
void | camera_process_off() |
void | camera_process_on() |
RemoteTransform3D | get_remote_transform() |
void | set_minimap_remote_path( path: NodePath ) |
void | map_zoom( direction: int ) |
RemoteTransform3D | get_weather_transform() |
void | set_weather_remote_path( path: NodePath ) |
Variable descriptions ​
bool camera_can_process = false ​
Camera state
CameraLogic current_camera_logic ​
Camera logic
Node3D camera_socket ​
Node references
Camera3D camera ​
The camera of the player.
RemoteTransform3D minimap_transform ​
The remote transform that moves the mini map camera with the player camera.
DirectionalLight3D mini_map_light ​
The light of the mini map.
RemoteTransform3D weather_transform ​
The remote transform that moves the weather with the player camera.
CameraLook look ​
The look of the screen and the shake of the camera (an effect, an event, a zone or the water asks it): see CameraLook.
Method descriptions ​
void legacy_input( event: InputEvent ) ​
Raw input for camera logics that have NOT been migrated to the InputManager contract (uses_input_manager() == false). Called by InputManager: presses/motion after the GUI, releases before it. Migrated logics get semantic look/zoom calls instead.
void set_camera_position( target: Variant, use_pan: bool = true ) ​
Public interface methods
float get_view_yaw() ​
The yaw the camera is facing (radians, Node3D.rotation.y convention). Read-only.
void camera_process_off() ​
Stops the camera logic from running.
void camera_process_on() ​
Lets the camera logic run.
RemoteTransform3D get_remote_transform() ​
Minimap functionality
void set_minimap_remote_path( path: NodePath ) ​
Sets the node the mini map camera follows.
void map_zoom( direction: int ) ​
Zooms the mini map in or out.
RemoteTransform3D get_weather_transform() ​
Weather functionality
void set_weather_remote_path( path: NodePath ) ​
Sets the node the weather follows.