Commit Graph

1313 Commits

Author SHA1 Message Date
needleful eb99c7243e Apply baked ambient light settings when baking lights with scene environment 2022-06-21 12:12:47 -07: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
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
Rémi Verschelde 0b048b6d73 SoftBody: Fix attachments property names after #61180
Fixes #61581.

(cherry picked from commit 5c3081dae2)
2022-06-10 14:42:05 +02:00
Rémi Verschelde a9e966c319
Merge pull request #61544 from lawnjelly/vis_notifier_max_dist
VisibilityNotifier - add max_distance feature
2022-06-10 10:57:53 +02:00
lawnjelly 0c5a424f65 VisibilityNotifier - add max_distance feature
Enables turning off objects by distance to the camera in addition to testing whether they are in the view frustum.
2022-06-09 11:37:42 +01:00
smix8 106bf9b793 Add NavigationMesh debug when navmesh is added later through scripts
Add NavigationMesh debug when navmesh is added later through scripts

(cherry picked from commit b6eff47bac)
2022-06-09 10:08:55 +02:00
lawnjelly 1d870403b2 Optimized Mesh Merging
Changes from PoolVector to LocalVector and pre-reserving vectors rather than push_back.
2022-06-07 20:16:51 +01:00
Rémi Verschelde a6b27b526f
Merge pull request #60822 from lawnjelly/fti_add_child_reset 2022-06-03 14:56:19 +02:00
bruvzg eb44e23ca3
[Label3D, 3.x] Monitor default theme font changes, to prevent use of invalid materials. 2022-05-23 18:16:17 +03:00
Haoyu Qiu ff5e671c81 Use float when calculating Label3D line height 2022-05-23 17:58:51 +08:00
bruvzg dc6d8d6098
Backport Label3D node implementation and Sprite*3D material render priority. 2022-05-23 09:14:41 +03: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
smix8 c3b39ca1e9 Disable threaded NavigationMesh bake on unsupported OS
Automatically disables threaded NavigationMesh bake when OS does not support threads.

(cherry picked from commit 49c603e127)
2022-05-16 17:52:07 +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
Rémi Verschelde 5e693b6d84 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
2022-05-16 16:38:26 +02:00
lawnjelly a4c0e2ecce Physics Interpolation - add warnings to RESET_PHYSICS_INTERPOLATION
Adds warnings when NOTIFICATION_RESET_PHYSICS_INTERPOLATION is called and has no effect due to the node being hidden or not interpolated.
2022-05-10 11:17:58 +01:00
lawnjelly 328866ee6a Physics Interpolation - Reset on adding child to SceneTree
For convenience, branches added to the SceneTree now have physics interpolation reset after the first update of the transform to the VisualServer.
2022-05-10 11:09:20 +01:00
Haoyu Qiu 0f7f3d08ba Add autocompletion for AnimatedSprite.play() 2022-05-05 09:04:40 +08:00
Pawel Lampe 505ace250d Add ability to `bake_navigation_mesh` off thread.
This feature makes it possible to workaround problems such as:
 - long baking time due to heavy synchronization when parsing geometry
   from mesh instances
 - crash when freeing `NavigationMeshInstance` while baking
 - errors when actively baking node tree is being detached from the
   scene tree
2022-05-04 22:41:38 +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 841d6e7fad
Merge pull request #59439 from fabriceci/3x-fix-move-and-collide-reported-collisions 2022-04-28 18:47:28 +02:00
lawnjelly 49eaa7bd65 Physics interpolation - fix streaking when unhiding nodes
The data flow to the VisualServer of current and previous transforms is essential for allowing correct interpolation. An optimization was present that disabled sending transforms when nodes were hidden, however this meant that when unhidden, nodes would interpolate incorrectly from the last transform received when hiding, rather than the up to date previous transform.

This PR disables the optimization and sends always sends transforms when a node is interpolated.
2022-04-28 12:15:14 +01:00
lawnjelly fbbb208a35 Fix CPUParticles emission updating using physics interpolation
When switching emission on and off, processing was always being switched on and off using internal_process, which was incorrect for using physics interpolation (where physics_process is the relevant one).

This PR correctly updates the process mode according to whether physics interpolation is being used.
2022-04-18 15:30:37 +01:00
Rémi Verschelde e1eb3c2fb1
Merge pull request #60147 from lawnjelly/interpolation_out_of_scenario 2022-04-13 17:08:08 +02:00
lawnjelly d2b1d29634 Physics interpolation - Move out of Scenario
Move VisualServer interpolation data out of Scenario and into VisualServerScene, so the interpolation data and enabled status is now common to all Scenarios.

Fix physics interpolation in multithreaded mode by ensuring tick and pre-draw are called.
2022-04-11 15:04:24 +01:00
Hugo Locurcio 4bf6cbe4fe
Allow `size` values as low as `0.001` in Camera's orthogonal/frustum mode
This allows for lower field of view (or higher zoom) in orthogonal
and frustum camera modes.

The property hint also allows setting the size with greater precision.
2022-04-08 18:53:07 +02:00
Rémi Verschelde 21c3048397 Add missing argument names in bindings 2022-04-04 12:56:59 +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
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
Rémi Verschelde 6a524b2cc0
Merge pull request #57661 from lawnjelly/bind_mesh_merging 2022-03-17 19:54:31 +01:00
Haoyu Qiu 7e07d4781a Fix AnimatedSprite infinite loop
(cherry picked from commit 3a439a9c03)
2022-03-02 11:00:26 +01:00
Rémi Verschelde 195b7374b2
Merge pull request #58650 from lawnjelly/portals_fix_prefix_duplication
Portals - fix duplication of instanced scenes during conversion
2022-03-01 19:56:20 +01:00
Rémi Verschelde 29d78f20de
Merge pull request #58642 from rburing/joints_fix_signals_3.x 2022-03-01 11:01:35 +01:00
lawnjelly 4ec4b5a60d Portals - fix duplication of instanced scenes during conversion
During room conversion, if a prefixed Spatial is converted to a Room / RoomGroup etc, when using instanced scenes the owner was incorrectly set, resulting in the instanced scene objects being duplicated.

This PR corrects this.
2022-03-01 09:44:40 +00: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
lawnjelly 688dc534e5 Fix get_global_transform_interpolated() with multiple ticks per frame
The previous and current transforms in the interpolation data were not being correctly updated in cases where two or more physics ticks occurred on a frame. This PR introduces a simple mechanism to ensure updates on interpolated spatials.
2022-02-25 11:22:00 +00:00
lawnjelly cb108fb4f8 Portals - improve STATIC bounds on conversion
Introduces fallback path for geometry types that are not recognised.
Allows STATIC mode for CPUParticles (using expansion margin)
Allows STATIC mode for Particles (using "visibility_aabb")
2022-02-22 10:00:17 +00:00
Rémi Verschelde 2dd545b512
Merge pull request #58141 from lawnjelly/occluder_shared_resources 2022-02-16 13:29:55 +01:00