kobewi
ecda6b9b0b
Camera2D code cleanup
2025-03-15 19:20:48 +01:00
Lazy-Rabbit-2001
5ca70d88a7
Improve usability of Camera2D
2025-03-12 09:57:31 +08:00
arkology
698cc24416
Fix Camera2D
limits drawing
2025-02-15 10:02:58 +03:00
lawnjelly
e46993f0db
Physics Interpolation - Auto-reset on set_physics_interpolation_mode()
...
Fixes historical bug where auto-reset wasn't working correctly.
Also fixes process modes on Cameras when mode is changed.
2025-02-10 10:19:54 +00:00
Ricardo Buring
56fc0fd175
CPUParticles2D - Add ability to follow physics interpolated target
...
Allows a non-interpolated particle system to closely follow an interpolated target without tracking ahead of the target, by performing fixed timestep interpolation on the particle system global transform, and using this for emission.
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2025-01-24 14:13:20 +01:00
Yufeng Ying
73d85f46c9
Remove unused headers in scene.
...
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
arkology
99886f3204
Remove double is_editor_hint()
check inside NOTIFICATION_READY
for Camera2D
node
...
`Engine::get_singleton()->is_editor_hint()` is already a part of `is_part_of_edited_scene()` function.
2024-11-25 09:28:16 +03:00
Michael Alexsander
16524a8a01
Add "Game" editor for better runtime debugging
2024-10-30 11:42:17 -03:00
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon
rule to true
...
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Ricardo Buring
ceadbaa299
Fixed Timestep Interpolation: Fix behaviour on pause
...
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-07-07 16:48:17 +02:00
kobewi
9f7f1809ff
Update Camera2D gizmos when screen size changes
2024-06-11 18:38:43 +02:00
Ricardo Buring
efb6a1c23d
Fix Parallax2D fixed timestep interpolation
...
The camera_screen_center value was stale in case of interpolation.
2024-05-26 23:08:35 +02:00
Bn-Fang
5d0a229a58
Fixed Typo in Camera 2D node's anchor mode
...
Fixed the Camera 2D node's anchor mode descriptor from "Fixed TopLeft" to "Fixed Top Left"
2024-04-23 16:24:45 -04:00
ajreckof
07406af6cc
Fix negative value for position_smoothing_speed being allowed.
2024-04-04 17:15:53 +02:00
Ricardo Buring
2ed2ccc2d8
Fixed Timestep Interpolation (2D)
...
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-03-23 12:28:36 +01:00
markdibarry
a62870956a
Add new Parallax2D node
2024-03-03 15:46:40 -05:00
Danni
734166f796
Ensure Camera2D scroll is updated on transform like 3.x
2023-11-05 18:01:34 -05:00
kleonc
836d80b306
Fix screen center position returned for rotated Camera2D
2023-10-16 09:02:49 +02:00
Mounir Tohami
4e4a725fff
Fix Camera2D is not working inside EditorPlugin
2023-08-13 22:14:13 +00:00
Adam Scott
deb45c0cab
Fix Camera2D crash when edited scene root is null
2023-07-18 20:36:40 -04:00
Yuri Sizov
553fd238cf
Merge pull request #73897 from TheSecondReal0/camera-line-width
...
Draw Camera2D outlines as 2 point primitives instead of 4 (consistent with how origin is drawn in 2D editor)
2023-03-25 13:49:12 +01:00
Asa Sprow
574293532d
Draw Camera2D outlines as 2 point primitives instead of 4
2023-03-23 15:19:32 -07:00
Marcus Elg
a835dfd96d
Fix Camera2D position smoothing properties not being grouped
2023-03-03 19:28:39 +01:00
kobewi
cf50eb130e
Fix custom viewports in Camera2D
2023-02-24 13:26:31 +01:00
kobewi
3f31c64300
Fix camera reparenting
2023-02-10 23:46:55 +01:00
kobewi
724d6581d6
Fix Camera2D crashes
2023-02-01 23:49:02 +01:00
Rémi Verschelde
14a4408e02
Merge pull request #65698 from KoBeWi/cameraman
...
Rework how current Camera2D is determined
2023-01-31 18:56:20 +01:00
Ninni Pipping
bbf203bc32
Hide clip_children for non-drawn CanvasItems
2023-01-30 08:22:06 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
...
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".
2023-01-05 13:25:55 +01:00
Richard Adenling
a3d8a78f1b
Fix for 2D viewport not updating in the editor when the camera moves
...
This fixes a problem with 2D viewports not taking the camera position
into consideration when previewed in the editor.
Fixes #40441
2022-12-06 11:34:32 +01:00
kobewi
7e2a8afb57
Rework how current Camera2D is determined
2022-12-02 00:05:02 +01:00
kobewi
e48c5daddf
Unify usage of GLOBAL/EDITOR_GET
2022-10-18 19:01:48 +02:00
Micky
43b9cc96da
Rename Camera2D's smoothing
to position_smoothing
...
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-11 16:51:26 +02:00
Luis Lopez
c262589e26
Add rotation smoothing to Camera2D
...
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-10-04 17:14:03 +02:00
Micky
ee16de583f
Reverse Camera2D.rotating
to ignore_rotation
...
`rotating` is misleading, as Camera2D is affected by `rotation` and `global_rotation` like any other Node2D
Updates description in the docs, as well.
2022-09-21 01:52:12 +02:00
Rémi Verschelde
adaec8396e
Merge pull request #64880 from Mickeon/rename-camera-position
...
Rename Camera2D's `*_screen_center` and `*_position` to `get_screen_center_position` and `get_target_position`
2022-09-06 17:00:52 +02:00
Micky
e31bb5ffeb
Rename CanvasItem.update()
to queue_redraw()
...
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.
Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.
Just a few comments have also been changed to say "redraw".
In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
Micky
ec963788cc
Rename Camera2D's screen_center
and *_position
...
`get_camera_screen_center` -> `get_screen_center_position`
`get_camera_position` -> `get_target_position`
2022-08-26 12:11:52 +02:00
Yuri Sizov
1a24c9e14b
Make _validate_property
a multilevel method
2022-08-22 18:35:11 +03:00
Marcel Admiraal
e61dc6bb04
Ensure changes to Camera2D's limits don't affect smoothed_camera_pos
2022-07-28 15:32:45 +01:00
Marcel Admiraal
3f83c3a0ac
When Camera2D enters tree, ensure first update is not lost
2022-07-28 15:29:38 +01:00
Marcel Admiraal
4c23fe602b
Update camera position when updating camera limit
2022-07-17 08:51:43 +01:00
FireForge
92817aa72f
Add Vector2/3 linking to more properties
...
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- BaseMaterial3D.uv1_scale
- BaseMaterial3D.uv2_scale
2022-06-14 09:33:44 -05:00
FireForge
4678736a39
Add suffixes to all nodes and resources
2022-06-11 09:41:05 -05:00
Hugo Locurcio
aabbb40009
Make {call,set,notify}_group()
immediate by default
...
This results in less surprising behavior out of the box.
Internal usages were modified to keep the existing behavior
identical there.
2022-05-05 16:59:37 +02:00
Rémi Verschelde
b7bc8dbebe
Merge pull request #57392 from madmiraal/implement-3888
2022-03-14 08:31:58 +01:00
Rémi Verschelde
0f5455230c
Use switch
consistently in _notification
(scene
folder)
2022-02-15 18:44:55 +01:00
Hendrik Brucker
b396fd4eef
Improve compilation speed (forward declarations/includes cleanup)
2022-02-12 02:46:22 +01:00
Marcel Admiraal
15ea6706e2
Invert Camear2D zoom to make it intuitive
2022-01-31 16:35:28 +00:00
Marcel Admiraal
f107139979
Rename Project Window width and height settings to match their function
2022-01-04 13:59:16 +00:00