summaryrefslogtreecommitdiff
path: root/scene/2d/camera_2d.h
AgeCommit message (Collapse)Author
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-10-11Rename Camera2D's `smoothing` to `position_smoothing`Micky
For Camera2D: `smoothing_enabled` -> `position_smoothing_enabled` `set_enable_follow_smoothing` -> `set_position_smoothing_enabled` `is_follow_smoothing_enabled` -> `is_position_smoothing_enabled` `smoothing_speed` -> `position_smoothing_speed` `set_follow_smoothing` -> `set_position_smoothing_speed` `get_follow_smoothing` -> `get_position_smoothing_speed`
2022-10-04Add rotation smoothing to Camera2DLuis Lopez
Camera2D has follow smoothing to interpolate towards a target position, but no rotation smoothing to align with the target rotation. This adds rotation smoothing directly into the Camera2D API by having two new properties: - `rotation_smoothing_enabled` - `rotation_smoothing_speed`
2022-09-21Reverse Camera2D.`rotating` to `ignore_rotation`Micky
`rotating` is misleading, as Camera2D is affected by `rotation` and `global_rotation` like any other Node2D Updates description in the docs, as well.
2022-08-22Make `_validate_property` a multilevel methodYuri Sizov
2022-01-31Invert Camear2D zoom to make it intuitiveMarcel Admiraal
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-08-13Fix some unnecessary includesAaron Franke
2021-07-03add viewport.get_camera_2d()Josh Chandler
* there is now a more clear distinction between camera_2d and camera_3d functions in the engine code * simplified camera2d's exported interface - now everything happens directly with the 'current' variable and make_current and clear_current are no longer exposed- there were some situations where calling one instead of set_current would result in incomplete results * rebased to current godot master
2021-03-19Use real_t in non-physics 2D nodesAaron Franke
2021-03-03Hide more options of disabled propertiesMichael Alexsander
2021-02-18Refactor Process Modereduz
Implements https://github.com/godotengine/godot-proposals/issues/1835#issuecomment-727186192 * PauseMode is now ProcessMode, containing the following states: ``` PROCESS_MODE_INHERIT, // same as parent node PROCESS_MODE_NORMAL, // process only if not paused PROCESS_MODE_PAUSE_ONLY, // process only if paused PROCESS_MODE_ALWAYS, // process always PROCESS_MODE_DISABLED, // never process ``` * NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED are received effectively when the node is paused and unpaused (not any longer when pause mode is set in SceneTree). * Renamed some nodes that used ProcessMode/process_mode to specify a callback type to ProcessCallback to avoid clashes.
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Rename Camera2D offset_h and offset_v propertiesMarcel Admiraal
2020-12-23Rename Control margin to offsetMarcel Admiraal
2020-07-18fixed camera2D showing incorrect bounds in editorJosh Chandler
2020-07-11Revert "Merge pull request #38341 from verdog/camera-bounds-fix"Rémi Verschelde
This reverts commit 08bbb3f161bfb4860d7574fa77b947872d344e7e.
2020-07-10Merge pull request #38341 from verdog/camera-bounds-fixRémi Verschelde
Fix Camera2D incorrect preview bounds
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-30fixed camera2D showing incorrect bounds in editorJosh Chandler
2020-03-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-08-06Tweaks related to Camera2D drag marginsTomasz Chabora
2019-01-06Add process_mode property to Camera2DTimo Schwarzer
This allows the user to choose if the camera should update in _process or _physics_process.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-09-20Rename pos to position in user facing methods and variablesletheed
Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-06-25Added some editor enhancements to Camera2D. Added the option to draw ↵TwistedTwigleg
Camera2Ds bounds and drag margins. Added options to toggle the drawing of Camera2Ds lines in the editor. When a Camera2D is marked as current, its lines become a little less transparent.
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-01-11Type renames:Juan Linietsky
Matrix32 -> Transform2D Matrix3 -> Basis AABB -> Rect3 RawArray -> PoolByteArray IntArray -> PoolIntArray FloatArray -> PoolFloatArray Vector2Array -> PoolVector2Array Vector3Array -> PoolVector3Array ColorArray -> PoolColorArray
2017-01-02ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky
Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
2017-01-01Welcome in 2017, dear changelog reader!Rémi Verschelde
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
2016-09-14Added a few functions to make 2D split screen easier.Juan Linietsky
2016-07-13Add an option to smooth camera limits when camera smoothing is enabled.Timo Schwarzer
2016-06-30Fix Camera2D header for align()Timo Schwarzer
2016-06-29Add align() to realign the Camera2D to its tracked nodeTimo Schwarzer
align() will center the tracked Node if anchor mode is set to DRAG_CENTER, otherwise the camera is set to the Node's position
2016-06-29Add reset_smoothing() for immediately fixing the camera to the destination ↵Timo Schwarzer
location
2016-03-09remove trailing whitespaceHubert Jarosz
2016-01-01Update copyright to 2016 in headersGeorge Marques
2015-12-12-make smoothing respect camera limits, fixes #3037Juan Linietsky
2015-06-11new space shooter demoJuan Linietsky
ortho camera sort fix, closes #2063
2015-04-18Updated copyright year in all headersJuan Linietsky
2015-03-03merges from okam repoJuan Linietsky
2014-02-10Implemented Camera2D.Rotating propertyrafalcieslak
2014-02-09GODOT IS OPEN SOURCEJuan Linietsky