Commit graph

1987 commits

Author SHA1 Message Date
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Juan Linietsky
4383b5ab1e Simplify AudioStreamPolyphonic
* Make AudioStreamPolyphonic not requre a polling thread (simpler, faster)
* Improve error reporting in AudioStreamPlayer*::get_stream_playback() error reporting to improve usability.
2023-01-23 10:47:01 +01:00
kobewi
615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Rémi Verschelde
3e9a831194
Merge pull request #65726 from KoBeWi/cellless
Don't print error in `get_cell_tile_data()`
2023-01-21 16:54:53 +01:00
Rémi Verschelde
7b622ce6e8
Merge pull request #71021 from reduz/prevent-physics-callback-removal
Error when removing a physics node during a physics callback
2023-01-21 11:28:02 +01:00
Rémi Verschelde
4abbc0c3fb
Merge pull request #71630 from groud/fix_tilemap_layer_delete_undo
Fixes TileMap undo not restoring tiles
2023-01-18 22:20:12 +01:00
Gilles Roudière
13e7f1a143 Fixes TileMap undo not restoring tiles 2023-01-18 17:43:41 +01:00
Rémi Verschelde
da1b78222c
Merge pull request #71615 from groud/bring_back_get_cells_by_id
Bring back TileMap::get_cells_by_id
2023-01-18 17:33:14 +01:00
Gilles Roudière
68afc0afa5 Bring back TileMap::get_cells_by_id 2023-01-18 15:56:31 +01:00
Gilles Roudière
10849a6d93 Avoid recreating TileMap internals when selecting it 2023-01-18 11:28:31 +01:00
Tomasz Chabora
5d75edb3b5 Update PathFollow2D when curve is changed 2023-01-15 18:11:21 +01:00
clayjohn
b514e20fb5 Remove normal_map from MeshInstance2D and MultiMeshInstance2D 2023-01-12 13:15:31 -08:00
smix8
594ffd2200 Tweak NavigationAgent2D defaults
Tweaks default values for NavigationAgent2D to work better out of the box within a new 2D project using default resolution.
2023-01-11 23:47:16 +01:00
Rémi Verschelde
91713ced81
Merge pull request #70716 from Calinou/particles-tweak-animation-offset-property-hint
Tweak particles animation offset property hint to allow more precise values
2023-01-10 11:01:14 +01:00
Rémi Verschelde
c3c5eceb35
Merge pull request #70463 from DarkKilauea/nav-server-const
[4.x] Rework const on NavigationServer methods
2023-01-08 22:50:05 +01:00
Rémi Verschelde
0d6fede757
Merge pull request #69809 from KoBeWi/runtime_enabler_2d
Fix VisibleOnScreenEnabler disabling in editor
2023-01-08 22:38:29 +01:00
Josh Jones
a0715b30f9 Rework const on NavigationServer methods
`const` is used on all methods, even when they cause modification of the server.  This reworks the methods of the server to only use `const` on method that don't change the state of the server.
2023-01-07 17:29:00 -08:00
Rémi Verschelde
3579d7a9f7
Merge pull request #36301 from KoBeWi/daddy_node
Add reparent methods to Node
2023-01-07 13:20:56 +01:00
Juan Linietsky
398e73c689 Error when removing a phycics node during a physics callback
* This behavior is not allowed, the error text suggests using call_deferred().
* Added a check in Node::remove_child to prevent future crashes of this type.
* Fixed a performance regression introduced by #36244.

Fixes #63718, probably other crashes too.
2023-01-07 12:57:24 +01:00
Rémi Verschelde
798582acf0
Merge pull request #65609 from dalexeev/animated-sprite
`AnimatedSprite{2D,3D}` improvements
2023-01-05 15:00:31 +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
Danil Alexeev
0d25d8e7fc
AnimatedSprite{2D,3D} improvements
* Add support for individual frame duration to `SpriteFrames`.
* Various minor improvements.
2023-01-05 13:13:25 +03:00
Rémi Verschelde
5e78f0f782
Merge pull request #70840 from MewPurPur/get-point-count-instead-of-points
Rename `get_points_count()` to `get_point_count()` in Gradient
2023-01-03 15:46:18 +01:00
VolTer
1af833be95 Rename get_points_count() to get_point_count() internally 2023-01-02 16:52:05 +02:00
Adam Scott
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
Hugo Locurcio
8df24835e0
Tweak particles animation offset property hint to allow more precise values
Values above 1.0 (or below 0.0) are no longer allowed, as these make
no visual difference whatsoever (and may cause particles not to appear
at all if looping is disabled).
2022-12-29 22:15:17 +01:00
stmSi
2041616934 Fix Editor hanging if audiostream's pitch_scale is NaN 2022-12-24 12:39:48 +06:30
reejk
fee04ccd93 Use TileSet navigation layer layers when TileMap generates navigation polygons 2022-12-22 00:35:20 +04:00
Rémi Verschelde
f84c308cf8
Merge pull request #69688 from smix8/navagent_stop_origin_automove_4.x
Stop NavigationAgents without a target from moving to world origin
2022-12-21 19:39:25 +01:00
Rémi Verschelde
5ad02aa08d
Merge pull request #67111 from DarkKilauea/nav-queries-link
Added signal to NavigationAgent when entering a link
2022-12-21 19:38:20 +01:00
Quentin Guidée
d9c05f7fbd
Fix double get_singleton()
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
2022-12-20 14:26:15 -05:00
Rémi Verschelde
f1f6b35b8c
Merge pull request #70244 from DarkKilauea/nav-fix-abbrev-compat
[4.x] Fix typo and ensure backwards compatibility for changed property names
2022-12-20 10:32:26 +01:00
Josh Jones
0572346985
Fix typo and ensure backwards compatibility for changed property names
Changes to the name of the `navmesh` and `navpoly` properties on
`NavigationRegion` caused navigation data to be lost on load.
This PR creates uses `_set`/`_get` to handle compatibility with the
older names on load, preserving the data.

Also fixes a typo on `get_vertices_per_polygon` in `NavigationMesh`,
and renames the property to remove the `polygon_` prefix which doesn't
match the setter/getter.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-12-20 09:57:54 +01:00
Rémi Verschelde
d124596862
Merge pull request #70263 from reduz/restore-rotation_degrees
Restore 'rotation_degrees' properties.
2022-12-19 16:28:44 +01:00
kleonc
3a34acdf55 TileSet Simplify tile shape polygons 2022-12-19 11:42:40 +01:00
Juan Linietsky
80b578b060 Restore 'rotation_degrees' properties.
By popular demand, restoring the helper properties to rotate objects in degrees.
Affected are local and global rotations for:

* Node2D
* Node3D
* Control
2022-12-19 10:59:47 +01:00
Josh Jones
5d8ba2b2d1 Add support for emitting a signal when entering a NavLink 2022-12-17 16:33:41 -08:00
smix8
34e7628f5f Fix Navigation API abbreviations inconsistency
Schema for navigation to name user facing API with  "navigation" without abbreviation and e.g. NavigationServer internals with abbr "nav".
2022-12-17 22:06:22 +01:00
smix8
4d68e2b18a Move NavigationPolygon to dedicated resource file
Moves NavigationPolygon resource class from NavigationRegion2D file to a dedicated file in resource folder.
2022-12-17 19:52:40 +01:00
Rémi Verschelde
c023d41036
Merge pull request #70118 from clayjohn/tilemap-layers
Use large offset for tilemap layer level canvas items
2022-12-17 14:29:22 +01:00
bmolyneaux
1e3a861e1a Queue redraw when MultiMesh instance transform changes
Fixes: #66849

This is a 4.0 version of #54899.
2022-12-15 17:01:17 -08:00
clayjohn
7d6a25c91e Use large offset for tilemap layer level canvas items
This matches the logic in _rendering_update_dirty_quadrants
2022-12-15 11:41:27 -08:00
Gilles Roudière
ffec180ccc Remove a confusing TileMap warning 2022-12-15 11:27:38 +01:00
kobewi
256e250c87 Fix VisibleOnScreenEnabler disabling in editor 2022-12-14 00:25:53 +01:00
Rémi Verschelde
fc517e6c89
Merge pull request #70003 from clayjohn/GLES3-cc
Various fixes and documentation for CanvasGroup
2022-12-13 23:31:43 +01:00
clayjohn
bdd4001ef0 Various fixes and documentation for CanvasGroup
Properly apply custom materials with CanvasGroups in the GLES3 backend

Properly blur backbuffer when using a partial rect in forward_plus and
gl_compatibility renderers

Properly set fit_margin when clear_margin is set

Fix shader error during backbuffer clear in mobile renderer
2022-12-13 10:22:18 -08:00
kobewi
99916ddbd1 Remove single-element groups from GPUParticles2D 2022-12-12 20:15:11 +01:00
Rémi Verschelde
ec8f52df8f
Merge pull request #69629 from smix8/agent_wild_callback_pointer_4.x
Fix Navigation agent callback wild pointer crash
2022-12-12 13:51:48 +01:00
smix8
194c1c44e0 Fix Navigation agent callback wild pointer crash
Fixes crash in sanitizer builds when callback agent or object are already freed.
2022-12-12 13:03:55 +01:00
Rémi Verschelde
53060e8ced
Merge pull request #69950 from kleonc/tile-map-const-refs-for-the-win
`TileMap` Pass some parameters by `const &` instead of by value
2022-12-12 11:52:55 +01:00
Rémi Verschelde
52a0bba833
Merge pull request #69922 from adamscott/fix-tilemap-tileset-heap-use-after-free
Fix `heap-use-after-free` error in `TileMap::~TileMap()`
2022-12-12 11:41:49 +01:00
Rémi Verschelde
ba3a2adb90
Merge pull request #67050 from KoBeWi/syrt
Warn if isometric TileMap is not Y-sorted
2022-12-12 11:40:54 +01:00
kleonc
71398ae22a TileMap Pass some parameters by const & instead of by value 2022-12-12 11:33:42 +01:00
Adam Scott
e7fb2f0294 Fix heap-use-after-free error in TileMap::~TileMap()
Co-authored-by: Gilles Roudiere <gilles.roudiere@gmail.com>
2022-12-12 04:52:00 -05:00
Josh Jones
5769b0e8d8 Enable assigning an owner to navigation regions and links
This allows users of the server APIs to get back the nodes that created certain regions and links.
2022-12-10 12:03:06 -08:00
Rémi Verschelde
156b5ca38f
Merge pull request #69644 from radenling/fix-viewport-update-in-editor
Fix for 2D viewport not updating in the editor when the camera moves
2022-12-09 18:06:23 +01:00
Vladislav Slobodenyuk
0b5c4216c8
Fix TileMap drawing itself twice on creation
Adds a check before calling `item_rect_changed()` in
`_recompute_rect_cache()` of `scene/2d/tile_map.cpp`. Makes sure
TileMap is only redrawn if the rect is actually changed.
Fixes #69754
2022-12-09 22:20:31 +09:00
Rémi Verschelde
75e558e271
Merge pull request #69774 from Calinou/backbuffercopy-only-show-rect-when-relevant
Fix BackBufferCopy `rect` property appearing when not relevant in inspector
2022-12-09 06:52:03 +01:00
Hugo Locurcio
080b6ac1ae
Fix BackBufferCopy rect property appearing when not relevant in inspector
The `rect` property is only effective if `copy_mode` is Rect.
2022-12-08 19:52:48 +01:00
Rémi Verschelde
a914ee8413
TouchScreenButton: Fix screen capability check
Fixes #69572.
2022-12-08 14:28:04 +01:00
Rémi Verschelde
de2d0f156e
Merge pull request #69713 from groud/rename_get_surrounding_tiles
Rename get_surrounding_tiles to get_surrounding_cells
2022-12-07 13:24:57 +01:00
Gilles Roudière
3ea54bb3a1 Rename get_surrounding_tiles to get_surrounding_cells 2022-12-07 11:09:10 +01:00
Markus Sauermann
e18107a57c Fix Determining Window for Touchscreen
DisplayServer::screen_is_touchscreen will likely never utilize its
parameter p_screen.
This PR replaces this function by DisplayServer::is_touchscreen_available()
with the same functionality.
This solves the problem, that a SubViewport was used for determining
the screen, which resulted in error messages.
2022-12-07 09:54:29 +01:00
smix8
860379fc16 Stop NavigationAgents without a target from moving to world origin
Stops NavigationAgents moving to the world origin without anyone telling them to do so.
2022-12-06 22:53:18 +01:00
Yaohua Xiong
322dbd0955 Fix Path2D fish bone direction 2022-12-06 20:45:17 +08: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
Rémi Verschelde
deb760fb1b
Path2D: Fix build issue after conflicts between #68860 and #69115 2022-12-06 11:22:11 +01:00
Rémi Verschelde
14861c45b5
Merge pull request #68860 from xiongyaohua/path3d_fishbones
Draw fish bones for Path3D and Path2D in the Editor
2022-12-06 10:46:54 +01:00
Yaohua Xiong
91e9ad92f5 Refactor baking code for Curve2D
The main change is to caculate tangent directly from bezier curve, without going
through discretized polyline, avoiding pitfalls of discretization. A similar refacor
had been applied to Curve3D.

The test cases for Curve2D is updated, comparing floating point with is_equal_approxmiate()
instead of `==`, in order to avoid float precision problem.
2022-12-05 21:22:05 +08:00
Yaohua Xiong
9bdc0cb16f draw fish bones for Path2D and Path3D
These fish bones are add to indicate the direction and local transforms alone the path.
2022-12-05 15:39:14 +08:00
kobewi
7e2a8afb57 Rework how current Camera2D is determined 2022-12-02 00:05:02 +01:00
Hendrik Brucker
e84f45fc93 Move z_index, z_as_relative and y_sort_enabled from Node2D to CanvasItem 2022-11-29 17:11:22 +01:00
Rémi Verschelde
519b9b5c21
Merge pull request #68486 from smix8/navpoly_outline_convex_error_4.x
Add detail to NavigationPolygon outline error msg
2022-11-28 13:37:00 +01:00
Rémi Verschelde
438b2e2d02
Merge pull request #59801 from Sauermann/fix-node2d-viewport-root-order
Fix Viewport root order after Node2D raise
2022-11-28 08:21:10 +01:00
Rémi Verschelde
34df77285c
Merge pull request #69146 from clayjohn/Polygon2D-error
Ensure that mesh instance is properly freed when freeing Polygon2D
2022-11-25 10:11:47 +01:00
Haoyu Qiu
06a0b26c9e Fix inspector not showing name for LabelSettings.font 2022-11-25 12:48:37 +08:00
clayjohn
5c95288a6e Ensure that mesh instance is properly freed when freeing Polygon2D 2022-11-24 17:34:25 -08:00
Rémi Verschelde
1fa80bf9d6
Merge pull request #67330 from KoBeWi/immortal_scenes
Don't free instanced scenes when recreating tiles
2022-11-24 18:54:08 +01:00
Micky
b6db09968d Fix AudioStreamPlayer2D and 3D's playing not updating right away 2022-11-22 15:46:28 +01:00
Rémi Verschelde
3a874804ab
Merge pull request #68886 from timothyqiu/motion-distance
Revert move vector parameter name to "motion"
2022-11-20 11:43:32 +01:00
Hugo Locurcio
2a0afb1dcc
Improve collision exception error messages for easier understanding 2022-11-19 17:35:44 +01:00
Haoyu Qiu
42ab2b9ef5 Revert move vector parameter name to motion 2022-11-19 20:19:50 +08:00
clayjohn
0e5a98cdd8 Fix drawing of 2D skeletons in the RD renderer.
Also clean up skeleton code in preparation for adding them to GLES3

Properly update Mesh2D AABBs when skeleton is updated
2022-11-18 23:36:40 -08:00
Rémi Verschelde
d0025a1f02
Merge pull request #64077 from Calinou/tweak-audiostreamplayer2d3d-default-panning
Decrease default AudioStreamPlayer2D/3D panning strength
2022-11-15 22:29:23 +01:00
kobewi
3e730c4277 Fix false warning when renaming Joint2D's node 2022-11-15 13:31:44 +01:00
clayjohn
9ce57050a5 Add GPUParticles to the OpenGL3 renderer.
This includes collision (2D SDF, Box, Sphere, Heightmap),
attraction (Box, Sphere), and all sorting modes.

This does not include 3D SDF collisions, trails, or
manual emission.
2022-11-14 23:28:25 -08:00
Markus Sauermann
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
smix8
f30ebacbe8 Add detail to NavigationPolygon outline error msg
Adds additional information to the error msg when the convex partition fails due to invalid outline arrays.
2022-11-10 21:12:51 +01:00
Hugo Locurcio
ab7a807f2b
Rename GPUParticles2D/3D's trail_length_secs to trail_lifetime
The property already has a "seconds" suffix in the inspector.
The "lifetime" term makes it more obvious that the property is
specified as time, not a distance in units.

The property hint now allows manually entering values greater than
10 seconds.

The internal rendering value's default now matches the particles
nodes' default.
2022-11-07 13:37:40 +01:00
kobewi
f8f25adc0b Don't free instanced scenes when recreating tiles 2022-11-07 00:32:41 +01:00
Rémi Verschelde
05ce0e3de1
Merge pull request #68222 from groud/fix_corner_terrain_painting
Fix terrain painting in corner-only matching mode
2022-11-04 10:05:58 +01:00
Gilles Roudière
ffacb31734 Fix terrain painting in corner-only matching mode 2022-11-03 19:08:43 +01:00
Markus Sauermann
022d24a9ae Fix Viewport root order after Node2D raise 2022-11-02 21:45:00 +01:00
Rémi Verschelde
23e793fd18
Merge pull request #68137 from kleonc/shape-cast-get-collider-rid
Add `ShapeCast2D/3D::get_collider_rid` method
2022-11-02 18:53:23 +01:00
kleonc
bbd225a804 Add ShapeCast2D/3D::get_collider_rid method 2022-11-01 21:17:18 +01:00
Yaohua Xiong
399c2a8dea Move rotation sampling from Path2D to Curve2D
The rotation sampling code is moved from Path2D to a new method
`sample_baked_with_rotation` on Curve2D.
2022-11-01 13:18:52 +08:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
0844f0ed10
Merge pull request #65452 from timothyqiu/agent-target
Make NavigationAgent `target_location` a property
2022-10-31 11:56:17 +01:00
Rémi Verschelde
420eb1aa34
Merge pull request #67445 from Zylann/rename_queue_delete
Rename queue_delete => queue_free
2022-10-31 10:51:18 +01:00
Rémi Verschelde
d0fbeec66a
Merge pull request #67580 from KoBeWi/little_things
Minor code improvements
2022-10-31 10:34:57 +01:00
Max Hilbrunner
f013315980
Merge pull request #67754 from kleonc/tilemap-fix-collision-shapes-debug-draw
Fix `TileMap` collision shapes debug draw
2022-10-30 00:15:42 +02:00
Clay John
ada2661a2c
Merge pull request #67956 from RedMser/safe-velocity-type
Fix type of `safe_velocity` parameter
2022-10-28 10:57:46 -07:00
RedMser
b9c3a5534b Fix type of safe_velocity parameter 2022-10-27 22:45:24 +02:00
Sam Briels
815231943b Emit target_reached signal after state is updated 2022-10-27 14:05:43 +02:00
Haoyu Qiu
e4100495b5 Make NavigationAgent target_location a property 2022-10-27 13:51:38 +08:00
kobewi
64fc443e24 Warn if isometric TileMap is not Y-sorted 2022-10-26 14:27:58 +02:00
Marc Gilleron
7543a5e014 Rename queue_delete => queue_free
# Conflicts:
#	editor/plugins/tiles/tiles_editor_plugin.cpp
2022-10-24 22:07:02 +01:00
Clay John
040f49ed6e
Merge pull request #67390 from groud/more_conservative_terrain_painting
Make terrain painting not change neighbors centers bits
2022-10-23 17:11:06 -07:00
Clay John
9be3fd640b
Merge pull request #67513 from Calinou/editor-light2d-fix-shadow-filter-smooth-visibility
Fix Light2D Shadow Filter Smooth property being visible with filter None
2022-10-23 17:03:07 -07:00
kleonc
fcb663df51 Fix TileMap collision shapes debug draw 2022-10-22 16:14:54 +02:00
Gilles Roudière
fe65d7aa7b Make terrain painting not change neighbors centers bits 2022-10-20 14:47:45 +02:00
kobewi
2f9cbbe0fb Fix texture filter and repeat in TileMap 2022-10-19 23:23:40 +02:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
kobewi
4aaed4fee1 Minor code improvements 2022-10-18 16:44:57 +02:00
Hugo Locurcio
6dcb295a07
Fix Light2D Shadow Filter Smooth property being visible with filter None 2022-10-17 01:35:10 +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
Rémi Verschelde
55815998d4 Merge pull request #67194 from RedMser/dirlight2d-height-suffix
Remove incorrect `px` suffixes
2022-10-11 09:26:49 +02:00
RedMser
a8a4e290fb Remove incorrect px suffixes 2022-10-10 18:18:15 +02:00
Rémi Verschelde
8017827144 SCons: Re-enable treating #warning as error with werror
Replace all TODO uses of `#warning` by proper TODO comments, and will open
matching bug reports to keep track of them.

We don't have a great track record fixing TODOs, but I'd wager we're even
worse for fixing these "TODO #warning" so we should prohibit this usage.
2022-10-10 16:12:26 +02:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Gilles Roudière
64e0c138d9 Fix TileMap occluders having a wrong transform 2022-10-06 14:06:33 +02:00
Rémi Verschelde
48e6f84295 Merge pull request #66951 from rburing/restore_recovery_as_collision
Revert "Turn on recovery as collisions only for floor snapping"
2022-10-06 08:56:44 +02:00
Ricardo Buring
311cdd2571 Revert "Turn on recovery as collisions only for floor snapping as this leads to unwanted behaviour for other surface than the floor."
This reverts commit 10395f5df2.
2022-10-05 22:51:29 +02:00
Rémi Verschelde
5b6ccf2fd2 Merge pull request #66720 from qarmin/unintialized_memory
Remove usage of unitialized variables
2022-10-05 11:42:47 +02:00
Rémi Verschelde
9cd62741bb Merge pull request #66839 from aaronfranke/editor-prop-hide-slider
Fix `hide_slider` vs `no_slider` inconsistency in editor property code
2022-10-05 08:47:06 +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
Rémi Verschelde
6a251fd0df Merge pull request #39072 from dalexeev/cs2d_debug_color
Add debug_color property to CollisionShape2D
2022-10-04 12:05:19 +02:00
Aaron Franke
094e8db97c
Fix hide_slider vs no_slider inconsistency in editor property code 2022-10-03 13:40:31 -05:00
Rafał Mikrut
2233624152 Remove usage of unitialized variables 2022-10-01 21:09:22 +02:00
Rémi Verschelde
f5f4d9bf00 Merge pull request #66143 from DarkKilauea/nav-queries-agent
Update NavigationAgent to use query_path
2022-09-29 15:33:25 +02:00
Josh Jones
a2c53b881b Update NavigationAgent to use query_path
This paves the way for having agents respond to link traversal.
2022-09-28 23:01:12 -06:00
MisterMX
407bbdda20 refactor(TileMap): Return Rect2i in get_used_rect
Signed-off-by: MisterMX <mbxd12@web.de>
2022-09-28 17:04:15 +02:00
Rémi Verschelde
8e14f9ba21 Merge pull request #64679 from DarkKilauea/nav-region-props
Improve consistency of NavigationRegion setters
2022-09-22 08:27:35 +02:00
Rémi Verschelde
d96b7d767a Merge pull request #66110 from Zylann/reference_get_count
get_reference_count()`
2022-09-22 08:26:29 +02:00
Josh Jones
a25bb9811a Improve consistancy of NavigationRegion setters 2022-09-21 22:42:52 -07:00
Marc Gilleron
474cee7daf Rename and expose RefCounted::get_reference_count() 2022-09-21 21:18:54 +01:00
Danil Alexeev
df2209c700
Add CollisionShape2D.debug_color property 2022-09-21 16:07:47 +03:00
Rémi Verschelde
307f560b39 Merge pull request #66183 from KoBeWi/ARE_YOU_READY
Set scene tiles' position before adding them
2022-09-21 11:07:43 +02:00
Rémi Verschelde
7bf61e3912 Merge pull request #64359 from Mickeon/rename-camera-rotating
Reverse Camera2D.`rotating` to `ignore_rotation`
2022-09-21 11:06:41 +02:00
Rémi Verschelde
28e1dc6162 Merge pull request #65828 from rburing/body_state_sync_callable
make `body_set_state_sync_callback` take a `Callable`
2022-09-21 11:05:41 +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
kobewi
a275b70b6e Set scene tiles' position before adding them 2022-09-21 00:37:18 +02:00
Rémi Verschelde
209a837f79 Merge pull request #66112 from Zylann/get_configuration_warnings_psa
Change return type of `get_configuration_warnings` to `PackedStringArray`
2022-09-19 22:03:44 +02:00
Marc Gilleron
aed3822a93 Change return type of get_configuration_warnings to PackedStringArray 2022-09-19 16:43:15 +01:00
fabriceci
10395f5df2 Turn on recovery as collisions only for floor snapping as this leads to unwanted behaviour for other surface than the floor. 2022-09-18 22:23:09 +02:00
Micky
213cc7859e Fix outdated warning in AnimatedSprite2D 2022-09-18 02:52:20 +02:00
Rémi Verschelde
0bb57bd9f2 Merge pull request #65931 from fabriceci/add-recovery-as-collision-in-low-level-methods
Add recovery_as_collision in move_and_collide/test_move
2022-09-18 00:42:29 +02:00
Rémi Verschelde
06c8f1c659 Merge pull request #58567 from madmiraal/fix-26470
Remove ParallaxLayer's invalid dependence on screen_offset
2022-09-18 00:42:22 +02:00
fabriceci
a72d5be2c6 Add recovery_as_collision in move_and_collide/test_move 2022-09-17 11:40:03 +02:00
Rémi Verschelde
16d44395b5 Merge pull request #65148 from Mickeon/animated-sprite-negative-speed-scale
Allow negative `speed_scale` in AnimatedSprite2D & 3D
2022-09-16 09:18:42 +02:00