Commit Graph

2075 Commits

Author SHA1 Message Date
smix8 2b19c70664 Fix 2D navigation debug visuals ignoring half the ProjectSettings
Fixes that NavigationRegion2D and TileMap debug visuals ignored more or less half the ProjectSetting. E.g. random color could not be disabled, edges did not display.
2023-02-13 11:42:23 +01:00
Rémi Verschelde beab9a7cf2
Merge pull request #73069 from brianwinterpixel/bugfix/linebuilder_box_uvs
Fix Line2D UVs when using BOX end cap mode
2023-02-11 14:40:09 +01:00
Rémi Verschelde 38d7583f86
Merge pull request #73063 from KoBeWi/it_exited_the_tree_but_changed_its_mind_and_broke_instead
Fix camera reparenting
2023-02-11 14:36:41 +01:00
Haoyu Qiu 65223e98de Strip name prefix of navigation agent debug properties in the inspector 2023-02-11 16:34:08 +08:00
Brian Semrau 53b4d85072 Fix Line2D UVs when using BOX end cap mode 2023-02-10 20:44:39 -05:00
kobewi 3f31c64300 Fix camera reparenting 2023-02-10 23:46:55 +01:00
smix8 f2c31965c0 Fix navigation support for multilayered TileMaps
Fixes support for multilayered TileMaps by creating dedicated navigation maps for each layer.
2023-02-10 17:13:40 +01:00
Rémi Verschelde d69809cab6
Merge pull request #72947 from DarkKilauea/nav-fix-avoidance-callback
Fix missing avoidance updates when using same velocity
2023-02-09 10:13:35 +01:00
Josh Jones 097f8a5fdb Fix missing avoidance updates when using same velocity
When using avoidance, if you set the same velocity for the agent, you won't get an update from the avoidance system.

This changes both the `set_target_position` and `set_velocity` setters to always accept user provided values, even if they are the same. This ensures that repathing and avoidance logic is always run when the user expects.
2023-02-08 23:18:53 -08:00
smix8 820b841fcb Fix NavigationAgent debug functions bindings in release builds
Fixes that certain NavigationAgent debug functions bindings were not available in release builds.
2023-02-08 21:49:04 +01:00
Josh Jones 20fdfd466b Improve consistency of NavigationAgent setters 2023-02-02 22:51:37 -08:00
kobewi 724d6581d6 Fix Camera2D crashes 2023-02-01 23:49:02 +01:00
Rémi Verschelde e52213e2fa
More codespell fixes, do more changes from previous ignore list 2023-02-01 12:11:36 +01:00
Rémi Verschelde 67ab9d85d4
Merge pull request #71543 from smix8/navigation_agent_debug_4.x
Add NavigationAgent Path Debug Visualization
2023-02-01 07:23:24 +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
smix8 0ab764e84b Add NavigationAgent Path Debug Visualization
Adds path debug visuals for NavigationAgent2D, NavigationAgent3D and NavigationServer.
2023-01-31 18:27:35 +01:00
Rémi Verschelde c8446754dd
Merge pull request #72357 from aaronfranke/area-gravity-unit-dist
Replace Area gravity point distance scale with unit distance
2023-01-31 10:53:16 +01:00
Rémi Verschelde 6c19a619ad
Merge pull request #72365 from groud/warn_ysort_tilemap
Warn when a TileMap layer is Y-sorted but not the TileMap node itself.
2023-01-30 13:28:22 +01:00
Gilles Roudière 62c874732d Warn when a TileMap layer is Y-sorted but not the TileMap node itself. 2023-01-30 10:34:35 +01:00
Rémi Verschelde 2e0d9efb72
Merge pull request #72115 from AThousandShips/clip_children_fix
Hide `clip_children` for some non-drawn CanvasItems
2023-01-30 10:02:54 +01:00
Ninni Pipping bbf203bc32 Hide clip_children for non-drawn CanvasItems 2023-01-30 08:22:06 +01:00
Aaron Franke 79215131b5
Replace Area gravity point distance scale with unit distance 2023-01-29 22:12:00 -06:00
Danil Alexeev 5195f723b9
Improve stroke drawing on 2D collision shapes 2023-01-29 19:07:09 +03:00
Silc Renew fa198c482e Fix AnimatedSprite play() don't redraw immediately 2023-01-29 08:00:42 +09:00
Rémi Verschelde 3a25148b9b
Merge pull request #72228 from DarkKilauea/nav-agent-callable
Use Callable for Navigation Agent callbacks
2023-01-28 15:58:49 +01:00
Rémi Verschelde e5752fdfd3
Merge pull request #72233 from TokageItLab/audio-blending
Implement blending audio feature to AnimationTree
2023-01-28 15:58:24 +01:00
Rémi Verschelde 04f7374775
Merge pull request #72157 from Kabiirk/GPUParticles2D-collision-UI-Fix
Fixing Inspector Property UI for GPUParticle2D collision_base_size [w.r.t Issue#71942]
2023-01-28 15:54:29 +01:00
Silc Renew 75330887d7 Implement blending audio feature to AnimationTree 2023-01-28 20:08:29 +09:00
Josh Jones 22f9ef19e1 Use Callable for Navigation Agent callbacks 2023-01-27 23:14:36 -08:00
Rémi Verschelde 525db733c8
Merge pull request #72129 from groud/unclamp_texture_origin
Rename texture_offset and unclamp it
2023-01-27 15:40:52 +01:00
Gilles Roudière d7f3bd50bd Rename texture_offset and unclamp it 2023-01-27 11:04:45 +01:00
Rémi Verschelde 91c0ed5e33
Merge pull request #71907 from TokageItLab/change-animated-sprite-api
Make `AnimatedSprite`'s playback API consistent with `AnimationPlayer`
2023-01-27 10:32:23 +01:00
Kabiir 21ef712863 Fixing Inspector Property UI for GPUParticle2D collision_base_size[Issue#71942] 2023-01-27 11:55:03 +05:30
Rémi Verschelde 91ad92657e
Merge pull request #69689 from smix8/navagent_rename_location_4.x
Rename Navigation uses of 'location' to 'position'
2023-01-26 22:57:03 +01:00
smix8 bf1571979c Rename Navigation uses of 'location' to 'position'
Contrary to the entire rest of the engine NavigationAgent's and NavigationLinks decided to deal with locations instead of positions.
2023-01-26 18:19:03 +01:00
Silc Renew 17bf6238fc Make AnimatedSprite's playback API consistent with AnimationPlayer 2023-01-26 12:40:19 +09:00
Aaron Franke 2bc0bcbd26
PropertyUsage: Rename "DO_NOT_SHARE_ON_DUPLICATE" to "ALWAYS_DUPLICATE" 2023-01-24 16:05:07 -06:00
Rémi Verschelde 1891d9fdf1
Merge pull request #71801 from akien-mga/codespell-en-GB-to-en-US
Convert en_GB spelling to en_US with codespell
2023-01-23 11:08:55 +01:00
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
Ricardo Buring ff4e72a0bc PhysicsServer2D and PhysicsServer3D: make body_set_state_sync_callback take a Callable
Prefer Callable to a C-style callback. This is helpful for GDExtension.
2022-09-15 15:09:23 +02:00
Micky 8142bc4ddd Allow negative `speed_scale` in AnimatedSprite2D & 3D
If the `speed_scale` is set to a negative value, the animation plays in reverse.
The second parameter of `play()` still reverses as before. if `speed_scale` and the second parameter of `play()` is true, the animation plays forward.

Also updates the documentation to better describe the pausing and playing behaviour.
2022-09-13 12:41:07 +02:00
Rémi Verschelde 3a82a1315b Merge pull request #65591 from MewPurPur/area-overlapping-function
Implement `Area[2D/3D].has_overlapping_[bodies/areas]`
2022-09-13 10:58:55 +02:00
kobewi 7afaca2091 Don't print error in get_cell_tile_data() 2022-09-13 01:39:35 +02:00
kobewi d5c703b83e Don't store frame of playing AnimatedSprite 2022-09-12 22:59:35 +02:00
Rémi Verschelde 97830e7187
Merge pull request #64155 from Mickeon/sprite-3d-backwards-speed-scale 2022-09-12 12:15:58 +02:00
VolTer ed4fe1e2bd Implement Area.has_overlapping_* 2022-09-10 12:17:37 +02:00
Micky b648ee43ab Harmonise AnimatedSprite3D and its 2D counterpart
Add the following properties to AnimatedSprite3D:
- `backwards` parameter in `play()`;
- `speed_scale`.

Both classes' internals are more similar, down to the line spacings. They've also been updated to be clearer and less inconsistent (e.g. `!frames.is_valid()` -> `frames.is_null()`, use SceneStringNames instead of CoreStringNames, rename the internal _queue_update to _queue_redraw)
2022-09-09 21:06:24 +02:00
Rémi Verschelde ce6f284e5f
Merge pull request #64394 from smix8/navigation_obstacles_reparent_4.x
Fix NavigationObstacle 2D/3D (re)parent issues
2022-09-09 19:20:14 +02:00
smix8 d7f75fab60 Remove / Replace old Navigation Debug Visualization
- removes / replaces leftovers from old navigation debug code
- cleanes SceneTree and ProjectSettings from old navigation debug
2022-09-07 18:30:35 +02:00
Trashtalk 1d233ce58c handled edge case where navigation_link_2d is outside of the tree when calling _edit_get_rect() 2022-09-07 00:05:56 +02:00
Rémi Verschelde 5fb84e5702 Merge pull request #64661 from Mickeon/rename-tilemap-world
Rename TileMap/GridMap.`world_to_map` and opposite to `local_to_map`
2022-09-06 17:01:16 +02:00