Commit graph

1360 commits

Author SHA1 Message Date
kobewi
2f13adbdb6 Remove error condition from get_global_transform()
(cherry picked from commit 2ff676a696)
2022-12-01 11:47:52 +08:00
Hugo Locurcio
4c26cac0e6
Improve collision exception error messages for easier understanding 2022-11-19 17:37:42 +01:00
kleonc
3e373c4eec Add ShapeCast2D/3D::get_collider_rid method 2022-11-02 15:20:13 +01:00
Haoyu Qiu
78981d2e0a Make NavigationAgent target_location a property 2022-10-31 20:46:38 +08:00
Sam Briels
3e186ae043 fix: emit target_reached signal after updating state 2022-10-31 13:04:20 +01:00
Rémi Verschelde
90f6baf26c Merge pull request #66155 from KoBeWi/animat3d_diff
[3.x] Don't store frame of playing AnimatedSprite
2022-10-03 13:58:28 +02:00
Haoyu Qiu
fba5a4ab9a Fix NavigationObstacle not registering to default navigation map 2022-09-28 15:49:26 +08:00
smix8
881e49c375 Fix TileMaps with origin offset placing NavPolygons wrong without a Navigation2D node
The legacy navigation was positioning baked TileMap navpolygons relative to the current Navigation2D node assuming that it is usually one of the parent nodes.

Without the deprecated Navigation2D node the default navigation map of the world_2d is used. This navigation map has no relative Node2D so it needs to use the global_transform of the TileMap to place navregions with the correct offset in case the TileMap is moved from the origin.
2022-09-22 17:14:51 +02:00
kobewi
dbce96abd9 Don't store frame of playing AnimatedSprite 2022-09-20 13:11:50 +02:00
lawnjelly
fdd82f4754 CPUParticles initialize data on set_amount
Fills particle data with zeroes on resize using set_amount(), to prevent garbage data including Nans being sent to VisualServer, which can corrupt the spatial partitioning.
2022-09-19 16:53:01 +01:00
lawnjelly
54a939a029 Low priority redraw request for AnimatedSprite
Prevents animated sprite from creating continuous redraws in vital_redraws_only mode.
2022-09-11 19:09:07 +01:00
Rémi Verschelde
747d30d567
Merge pull request #64372 from smix8/navigation_fix_obstacles_default_map_3.x 2022-08-30 11:01:30 +02:00
Rémi Verschelde
fd08545a59
Merge pull request #64579 from marcinn/backport-panning-strength
[3.x] Backport panning strength parameters from 4.0
2022-08-24 23:55:28 +02:00
Marcin Nowak
90762b9660 [3.x] Backport panning strength parameters from 4.0 2022-08-23 23:27:51 +02:00
Yuri Sizov
39f46613bb Backport fixes to documentation for paths, curves and navigation servers 2022-08-19 15:52:03 +03:00
smix8
47b39ce4c2 Fix NavigationObstacle nodes not registering to default navigation map
Fix NavigationObstacle nodes not registering to default navigation map.
2022-08-13 19:46:12 +02:00
Cory Petkovsek
f7f112ab1f Fix free(RID) abuse by various classes 2022-08-11 02:31:00 +08:00
Josh Jones
9d1a972b49 Fix typo when setting NavigationRegion travel_cost
(cherry picked from commit 8c324132d0)
2022-08-08 09:51:45 +02:00
smix8
30d4555c65 Fix TileMap error msg when optional navigation node is not set
Fixes TileMap error msg spam when bake_navigation=true but the optional and depr navigation node is not set.
2022-08-06 21:58:47 +02:00
Rémi Verschelde
ab7e2564f3
Merge pull request #63659 from PrecisionRender/add-shape-cast-3d
[3.x] Add `ShapeCast` and `ShapeCast2D` nodes
2022-08-06 00:33:29 +02:00
Rémi Verschelde
906a693934
Merge pull request #53852 from Calinou/particles-allow-negative-scale
Allow negative scale in Particles and CPUParticles
2022-08-05 22:34:43 +02:00
Rémi Verschelde
173a803c8a
Merge pull request #49495 from kleonc/sprite_frames_editor-updating-fixes-3x 2022-08-05 19:35:30 +02:00
PrecisionRender
47a62e28ac [3.x] Add ShapeCast and ShapeCast2D nodes 2022-07-30 10:23:58 -05:00
Marcel Admiraal
d000a5fa30 Ensure changes to Camera2D's limits don't affect smoothed_camera_pos 2022-07-28 15:30:34 +01:00
Marcel Admiraal
a124d89f01 When Camera2D enters tree, ensure first update is not lost 2022-07-28 15:30:06 +01:00
Rémi Verschelde
818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
kleonc
558b96f1b1 Fix CanvasItem not exiting its canvas group on canvas exit 2022-07-20 12:49:38 +02:00
BimDav
ab644a9913 Add option in VisibilityEnabler2D to hide the parent for better performance 2022-07-19 10:56:47 +02:00
Rémi Verschelde
33b5709d53
Merge pull request #61601 from Haydoggo/path-follow-fix-3.x 2022-07-18 09:36:22 +02:00
Marcel Admiraal
162cb5748a Update camera position when updating camera limit 2022-07-17 09:02:34 +01:00
Hayden
e05f969adb Fix crash on NaN offset in path_follower 2d and 3d 2022-07-14 14:30:24 +12:00
Rémi Verschelde
66c4047a6c SpriteFrames: Sort animations alphabetically
Fixes #62143.
2022-07-13 15:48:55 +02:00
kleonc
8ae246f15e AnimatedSprite Fix updating inspector when SpriteFrames is modified 2022-07-13 15:48:11 +02:00
reduz
995281ca90 Fix editor-only visibility for lights
* Update visibility again for editor-only lights if owner changes.

Fixes #26399, supersedes #52327

(cherry picked from commit d69e3791bf)
2022-07-03 03:21:51 +02:00
smix8
381e8dd278 Group NavigationAgent properties
Groups the ill-defined NavigationAgent properties between pathfinding and avoidance to make it more clear which property affects what.

(cherry picked from commit dde09be302)
2022-06-30 19:23:01 +02:00
Rémi Verschelde
3c35617c50
Merge pull request #62187 from smix8/nav_nodes_depr_3.5 2022-06-20 18:36:17 +02:00
smix8
693aeaf799 [3.5] Mark Navigation/Navigation2D nodes as deprecated
Mark Navigation/Navigation2D nodes as deprecated. They already just redirect calls to the NavigationServer and have no longer a real purpose. In Godot 4.0 both nodes are already removed for good reasons.
2022-06-20 17:37:55 +02:00
smix8
88e42b2915 Add NavigationAgent desired path distance
Add NavigationAgent desired path distance

(cherry picked from commit 07740302f3)
2022-06-20 15:11:09 +02:00
Rémi Verschelde
4137578369 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-06-19 13:48:15 +02:00
kleonc
e55ba60da1 Fix CPUParticles2D.emission_shape enum hint 2022-06-18 16:07:34 +02:00
smix8
c6f9627c74 [3.5] Add NavigationAgent2D/3D set_navigation_map() function
Add NavigationAgent2D/3D set_navigation_map() function. Also fixes some bugs from leftover code before the backport update.
2022-06-16 19:25:52 +02:00
smix8
8bd7c6188b [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
2022-06-14 05:55:14 +02:00
smix8
c111d6b621 Expose get_mesh() for NavigationPolygon Resources
Expose get_mesh() for NavigationPolygon Resources.

(cherry picked from commit 8bcce0ebb2)
2022-06-09 10:09:46 +02:00
smix8
3aa05b7b67 [3.5] Fix TileMap texture offset for navigationmesh and collisionshapes
[3.5] Fix TileMap texture offset for navigationmesh and collisionshapes
2022-06-08 19:30:52 +02:00
smix8
8df9fd076f Process NavigationAgent2D/3D avoidance on demand only
Changes NavigationAgent avoidance callback to a toggle that is disabled by default.
Also fixes a few missing descriptions / wrong warnings.

(cherry picked from commit 7f3688603c)
2022-05-22 19:43:56 +02:00
smix8
88acb5b798 Make Navigation Agents and Obstacles respect parent process mode
Temporarily removes agent from navigation map when parent node cannot process due to SceneTree pause and process_mode property. Normal process_mode does not work as other agents would still avoid the paused agents because they were still active on the navigation map and the rvo world. Also fixes potential crash when region_get_map or agent_get_map is called while no map is set.

(cherry picked from commit 6b51ab66d8)
2022-05-19 15:34:56 +02:00
Haoyu Qiu
b657d0c76c Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NOEDITOR
2022-05-19 11:31:35 +08:00
Rémi Verschelde
b0a2b34d48
Merge pull request #61150 from smix8/navigation_region2d_update_navpoly_3.x 2022-05-18 14:36:55 +02:00
smix8
37530b0871 Update NavigationPolygonInstance when polygons of NavigationPolygon change
Updates NavigationPolygonInstance polygons on the NavigationServer2D when the NavigationPolygon Resource emits its changed signal due to e.g. polygons altered by script.
2022-05-18 13:53:46 +02:00
Haoyu Qiu
96b1b1991b Fix AnimatedSprite doesn't emit animation_finished when changing playback direction
(cherry picked from commit d5f5e96e11)
2022-05-16 21:12:21 +02:00
smix8
b11708c50d Expose NavigationObstacle2D/3D get_rid() and add config warning
Exposes get_rid() function for scripting.
Adds configuration warning when obstacle is used with not intended static body parent.

(cherry picked from commit 001d89223f)
2022-05-16 17:52:07 +02:00
smix8
847fab6272 Fix NavigationObstacle2D/3D get_global_transform() error
Fixes NavigationObstacle2D/3D reporting a 'get_global_transform: Condition "!is_inside_tree()" error when estimating the agent radius.

The collisionshapes that are lower in the SceneTree order than the obstacle node are not loaded in the SceneTree yet so the global_transform function fails.

Also adds warning message when this happens.

(cherry picked from commit cc707412e9)
2022-05-16 17:52:07 +02:00
kobewi
bdbbc78da4 Mention that Area2D doesn't support one_way_collision
(cherry picked from commit c836bdf5b1)
2022-05-16 16:27:51 +02:00
Haoyu Qiu
0f7f3d08ba Add autocompletion for AnimatedSprite.play() 2022-05-05 09:04:40 +08:00
Rémi Verschelde
8835654578 Merge pull request #60656 from akien-mga/tilemap-methods-const-ref-vector2 2022-05-02 09:51:51 +02:00
smix8
ebcbbec563 Add get_region_rid() to NavigationPolygonInstance and NavigationMeshInstance
Add get_region_rid() to NavigationPolygonInstance and NavigationMeshInstance
2022-04-30 15:54:12 +02:00
Rémi Verschelde
2834332591 TileMap: Use const ref for all Vector2 parameters 2022-04-30 14:05:57 +02:00
Rémi Verschelde
841d6e7fad
Merge pull request #59439 from fabriceci/3x-fix-move-and-collide-reported-collisions 2022-04-28 18:47:28 +02:00
Haoyu Qiu
f33dec8084 Improve RayCast2D debug shape
Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2022-04-20 17:28:35 +08:00
kobewi
73248ccf89 Fix TouchScreenButton error spam
(cherry picked from commit db19cc60fb)
2022-04-13 11:43:49 +02:00
Haoyu Qiu
5c039ccc72 Free region RID when cleaning NavPoly in TileMap 2022-04-08 19:19:09 +08:00
Ricardo Buring
21580f94ad NavigationObstacle2D: estimate agent radius only when configured to do so 2022-04-03 22:11:44 +02:00
Pedro J. Estébanez
9e2d5120c1 Fix crash when passing null to AudioStreamPlayer::set_stream() 2022-04-03 12:52:17 +02:00
Rémi Verschelde
5c0dccace9
Merge pull request #59413 from ellenhp/preinstance-audio-streams 2022-03-31 18:49:05 +02:00
Ellen Poe
027546ee8a [3.x] instance audio streams before AudioServer::lock call 2022-03-31 08:48:36 -07:00
Haoyu Qiu
b89befe173 Fix crash when using Camera2D::set_custom_viewport() 2022-03-31 16:42:14 +08:00
FireForge
7f787857ef Fix inspector group name capitalization
(cherry picked from commit 88b09694e7)
2022-03-29 00:20:23 +02:00
fabriceci
65b3200a16 Fix wrong collision reported on move_and_collide 2022-03-23 11:39:54 +01:00
Jason Knight
09e4672f0d Bind NOTIFICATION_LOCAL_TRANFORM_CHANGED 2022-03-20 11:34:29 -06:00
Haoyu Qiu
b76147ec16 Fix top level CanvasItem visibility
The editor gizmo fix from previously reverted
642591b6a9 is kept here.
2022-03-08 01:29:24 +08:00
Haoyu Qiu
d0901d4d55 Revert backport of "Rework CanvasItem visibility propagation"
This reverts part of commit f49ffe4bb0
2022-03-08 01:17:52 +08:00
Haoyu Qiu
ba0a17a458 Revert "Fix CanvasItem visibility propagation"
This reverts commit 642591b6a9.
2022-03-08 01:06:14 +08:00
Haoyu Qiu
7e07d4781a Fix AnimatedSprite infinite loop
(cherry picked from commit 3a439a9c03)
2022-03-02 11:00:26 +01:00
Ricardo Buring
322e3a9567 Joint2D and Joint: make set_exclude_nodes_from_collision respect signals 2022-02-28 22:51:40 +01:00
Ricardo Buring
f197e5eebb Joint2D and Joint: update joint on NOTIFICATION_POST_ENTER_TREE
This allows reparenting, etc.
2022-02-28 22:48:48 +01:00
kobewi
642591b6a9 Fix CanvasItem visibility propagation 2022-02-21 11:11:03 +01:00
Haoyu Qiu
85be83ebbb Fix typo in CanvasItem visibility propagation backport 2022-02-18 19:12:29 +08:00
Hugo Locurcio
ac0d37dcef
Add a property hint for the Line2D Round Precision property
This prevents choosing extremely high values which cause performance
issues for no visual benefit.

(cherry picked from commit 6b52aa67b8)
2022-02-17 09:59:28 +01:00
Haoyu Qiu
f49ffe4bb0 Backport CanvasLayer visibility 2022-02-11 01:00:35 +08:00
Haoyu Qiu
74a4795fb1 Fix RayCast{,2D}.clear_exceptions clears parent 2022-02-08 16:22:10 +08:00
lawnjelly
a0c6d16c90 Add editor vital redraws only option
When editor continuous redraws is switched off, the editor only redraws when a redraw_request was issued by an element in the scene. This works well in most situations, but when scenes have dynamic content they will continuously issue redraw_requests.

This can be fine on high power desktops but can be an annoyance on lower power machines.

This PR splits redraw requests into high and low priority requests, defaulting to high priority. Requests due to e.g. shaders using TIME are assigned low priority.

An extra editor setting is used to record the user preference and an extra option is added to the editor spinner menu, to allow the user to select between 3 modes:

* Continuous
* Update all changes
* Update vital changes
2022-02-02 11:26:45 +00:00
Rémi Verschelde
9cdd110cc3
Merge pull request #56600 from Scony/fix-navigation-obstacle-errors-3.x 2022-01-28 23:18:57 +01:00
Fitch24
c6890c6d12 Fix "mass" and "weight" properties of the RigidBody (and RigidBody2D) in the Inspector view 2022-01-27 19:58:51 +07:00
Haoyu Qiu
fa96505418 Store ObjectID instead of raw pointer for Shape Owners 2022-01-25 17:16:02 +08:00
Pawel Lampe
67cf622935 Improve Navigation2D default settings, fixes #56852
This commit reduces `cell_size` and `edge_connection_margin` default
values so that `Navigation2D` behaves more like in Godot <= `3.4` by default.
2022-01-23 14:07:31 +01:00
Rémi Verschelde
40a348bce2
Merge pull request #57013 from Killfrra/3.x
[3.x] Backport method `get_rid` for NavigationAgent
2022-01-21 18:35:19 +01:00
Mak Kma
1c3d3af6ef backported method get_rid for NavigationAgent 2022-01-21 00:15:16 +03:00
lawnjelly
adf14bfdde Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 17:28:31 +00:00
Rémi Verschelde
e00a6d2b71
Merge pull request #56748 from albinaask/Fix-for-#56324 2022-01-13 17:05:16 +01:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Albin
21ca1c9cd7 Fixed a number of ",or_greater" for the bug #56324
fix to #56324

Note: CPU_Particles_2d is missing ring emitter
2022-01-13 11:51:24 +01:00
Anilforextra
3fad43acad
Path2D: Check points count before rendering.
(cherry picked from commit b770a4d0ac)
2022-01-12 17:34:21 +01:00
Arnav Vijaywargiya
a51f3f2a58
Fixed incorrect property types
(cherry picked from commit 0c46f73b5e)
2022-01-12 17:28:07 +01:00
Rémi Verschelde
1b0ba42ea1
Merge pull request #55268 from Calinou/gpu-particles-macos-performance-warning 2022-01-12 16:51:31 +01:00
Rémi Verschelde
7249e170f7
Merge pull request #56044 from timothyqiu/position-nodes
[3.x] Improve axis awareness and visibility for Position2D and Position3D
2022-01-11 08:54:52 +01:00
Pawel Lampe
6093d59b17 Fix NavigationObstacle errors
* Typo in error print leading to false-positive message
* `NavigationObstacle` premature radius estimation (before entering the tree)
* `NavigationObstacle2D` premature radius estimation (before entering the tree)
2022-01-07 20:04:19 +01:00
Rémi Verschelde
02d9ac1071
i18n: Sync template with current 3.x codebase
Weblate will now track the state of `3.x` to prepare for the 3.5 release.
2022-01-07 13:30:21 +01:00
fabriceci
10e63b8dd6 backport moving_platform_apply_velocity_on_leave 2022-01-07 12:54:49 +01:00
Haoyu Qiu
e97cae86b8 Add missing break in NavigationObstacle2D 2022-01-06 21:23:53 +08:00
Wilson E. Alvarez
4106f95f30
Expose autotile_coord parameter in TileMap.set_cellv 2022-01-05 21:24:35 -05:00