Commit Graph

1834 Commits

Author SHA1 Message Date
Hugo Locurcio 515676a7f5
Remove unused `GPUParticlesCollisionHeightField3D.follow_camera_push_ratio` property
- Rename setter/getter methods for consistency.
- Remove section in the inspector as there is now only 1 property
  within the section.
- Add performance hints to property hints.
2022-05-13 04:19:28 +02:00
FireForge 88a8038387 Capitalize/fix some property enum hints 2022-05-12 15:03:16 -05:00
Rémi Verschelde edf61c077c
Merge pull request #60917 from akien-mga/ci-emscripten-3.1.10 2022-05-10 15:08:32 +02:00
Rémi Verschelde b6983eeccf
Merge pull request #51591 from Calinou/call-group-default-immediate
Make `{call,set,notify}_group()` immediate by default
2022-05-10 14:52:23 +02:00
Rémi Verschelde d8935b27a9 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.
2022-05-10 13:03:13 +02: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
Haoyu Qiu 312ec612c7 Add autocompletion for AnimatedSprite.play() 2022-05-05 14:36:35 +08:00
Pawel Lampe 88d3f14697 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 23:00:18 +02:00
Aaron Franke fa7a7795f0
Rename Basis get_axis to get_column, remove redundant methods 2022-05-03 09:37:47 -05:00
Rémi Verschelde 931838b330
Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
2022-05-03 14:40:01 +02:00
Hugo Locurcio 180e5d3028
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde c273ddc3ee Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Rémi Verschelde 4e06ce7840
Merge pull request #60655 from smix8/navigation_region_rid_4.x
Add get_region_rid() to NavigationRegion2D and NavigationRegion3D
2022-05-01 14:17:40 +02:00
bruvzg 0a0e94d996
Expose Label3D and Sprite*3D material render priority properties. 2022-04-30 15:09:30 +03:00
smix8 05d06b8957 Add get_region_rid() NavigationRegion2D and NavigationRegion3D
Add get_region_rid() to NavigationRegion2D and NavigationRegion3D
2022-04-30 13:27:30 +02:00
Rémi Verschelde a817bd96c0
Merge pull request #59297 from fabriceci/fix-jitter-2D-slight-slope 2022-04-29 15:33:45 +02:00
Aaron Franke 1bf94dff3a
Rename Basis "elements" to "rows" 2022-04-29 08:02:56 -05:00
bruvzg be2ee9d277
[Label3D] Add offset property. 2022-04-28 21:23:15 +03:00
Rémi Verschelde 212989d467
Merge pull request #59438 from fabriceci/fix-move-and-collide-reported-collisions
Fix wrong collision reported on move_and_collide
2022-04-28 18:47:22 +02:00
Markus Sauermann a793960a10 Fix cppcheck const parameters
Convert method signature parameters to const where it is possible

# Conflicts:
#	drivers/gles3/rasterizer_canvas_gles3.cpp
#	drivers/gles3/rasterizer_canvas_gles3.h
#	editor/plugins/animation_state_machine_editor.cpp
#	editor/plugins/animation_state_machine_editor.h
2022-04-28 11:35:39 +02:00
Rémi Verschelde 1737494479
Merge pull request #60321 from rburing/pathfollow_offset_yes_a_number 2022-04-27 13:27:19 +02:00
Rémi Verschelde 2890ac7100
Merge pull request #60319 from TokageItLab/implement-global-rest 2022-04-27 11:06:42 +02:00
Rémi Verschelde 8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Rémi Verschelde 02bb8e948f
Merge pull request #60261 from fire-forge/theme-prop-renames 2022-04-25 16:20:19 +02:00
FireForge 3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
bruvzg be611c1c05
Implement Label3D node.
Add "generate_mipmap" font import option.
Add some missing features to the Sprite3D.
Move BiDi override code from Control to TextServer.
Add functions to access TextServer font cache textures.
Add MSDF related flags and shader to the standard material.
Change standard material cache to use HashMap instead of Vector.
2022-04-22 12:08:46 +03:00
bruvzg de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
Silc 'Tokage' Renew 4d4ffa3a2c Implement global rest 2022-04-18 02:11:19 +09:00
Ricardo Buring eb9157df23 PathFollow2D and PathFollow3D: don't set offset to NaN 2022-04-17 17:26:05 +02:00
Rémi Verschelde d27f60f0e8
Merge pull request #60199 from akien-mga/color-clarify-srgb-linear-conversions 2022-04-13 13:41:21 +02:00
Rémi Verschelde 9b89c07075
Merge pull request #60034 from Calinou/camera-allow-lower-size 2022-04-13 12:48:08 +02:00
Rémi Verschelde 46ef52162e Color: Rename `to_srgb`/`to_linear` to include base color space
This helps reduce confusion around sRGB <> Linear conversions by making
both input and output color spaces explicit.
2022-04-13 11:45:52 +02:00
SaracenOne f8cc2e054d Ensure gizmos are added to newly created Node3D-derivatives and silence error for attempting to create gizmos twice 2022-04-13 04:39:01 +01:00
bruvzg 9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Hugo Locurcio 2252663163
Allow `size` values as low as `0.001` in Camera3D'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:49:45 +02:00
Rémi Verschelde f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Rémi Verschelde 26048c805b
Merge pull request #59331 from bartekd97/navigation-agent-layers 2022-04-01 13:35:51 +02:00
Rémi Verschelde 5149db8d85
Merge pull request #59644 from akien-mga/template-no-editor-dep 2022-03-28 23:35:51 +02:00
Rémi Verschelde 324215c485
Merge pull request #59525 from fire-forge/fix-group-names 2022-03-28 21:44:35 +02:00
Rémi Verschelde 45ec0e31c3 Remove last editor code dependencies in template build
SConstruct change also makes it possible to outright delete the `editor`
folder in a `tools=no` build, which we use in CI to ensure no invalid
cross-dependencies are added.
2022-03-28 21:13:01 +02:00
FireForge 88b09694e7 Fix inspector group name capitalization 2022-03-28 14:02:06 -05:00
Rémi Verschelde 7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
Rémi Verschelde 5371009d8e Object: Remove unused category boilerplate
We might want to re-add something like this if/when we find a good use case
for it and do the effort to categorize all objects in the API properly.

Until then, it's better to remove that boilerplate since it's not needed.

Closes #18711.
2022-03-26 15:46:01 +01:00
fabriceci e2812fcb0f When only a recovery occurs, don't report a collision on move_and_collide 2022-03-23 10:24:35 +01:00
fabriceci 528dfbf63e Fix 2D jitter on slight slope 2022-03-21 09:08:52 +01:00
BARTEK-PC\Bartek 4972f1b864 Expose navigable layers for NavigationAgent2D/3D 2022-03-20 15:04:56 +01:00
Rémi Verschelde acc9b5b390
Merge pull request #55399 from RPicster/particlesmaterial-sphere-emittershape
ParticleMaterial: Sphere emission shape emitting from the volume.
2022-03-18 08:21:59 +01:00
Hugo Locurcio c45d2c242b Replace DirectionalLight3D's `use_in_sky_only` with `sky_mode` enum
3 options are available:

- Light and Sky (default)
- Light Only (new)
- Sky Only (equivalent to `use_in_sky_only = true`)

Co-authored by: clayjohn <claynjohn@gmail.com>
2022-03-17 14:00:02 -07:00
reduz 8b547331be Create GDExtension clases for PhysicsServer3D
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support)
* Some changes on native struct binding for PhysicsServer

This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-15 18:39:31 +01:00
Rémi Verschelde 51bbcbdec2
Merge pull request #45263 from KoBeWi/😕 2022-03-15 13:18:27 +01:00
reduz 6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
kobewi 39d429e497 Change some math macros to constexpr
Changes `MAX`, `MIN`, `ABS`, `CLAMP` and `SIGN`.
2022-03-09 16:24:32 +01:00
fabriceci 7f47889a5f Avoid directional correction when the motion is downward 2022-03-09 13:45:42 +01:00
Rémi Verschelde 1561737055
Merge pull request #49447 from Calinou/remove-shadow-color-property
Remove unused `shadow_color` property from Light3D
2022-03-08 07:48:05 +01:00
reduz ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
Hugo Locurcio aea104deb7
Remove unused `shadow_color` property from Light3D
This shadow color property was no longer effective since the shaders
were optimized to improve occupancy.
2022-03-04 23:12:18 +01:00
Rémi Verschelde 9c6b6ffe13
Merge pull request #58717 from CrezyDud/master 2022-03-04 18:04:19 +01:00
Rémi Verschelde 3078b92dff
Merge pull request #58512 from Calinou/light3d-add-distance-fade 2022-03-04 12:26:29 +01:00
MrSwedish 97c5fd17a7 Add linear_velocity and angular_velocity to PhysicalBone3D 2022-03-03 20:34:29 +01:00
Ricardo Buring cb5bc58e81 Joint2D and Joint3D: make set_exclude_nodes_from_collision respect signals 2022-02-28 22:25:45 +01:00
Ricardo Buring 9e100c3e7a Joint2D and Joint3D: update joint on NOTIFICATION_POST_ENTER_TREE
This allows reparenting, etc.
2022-02-28 22:21:32 +01:00
Rémi Verschelde f968c11b86
Merge pull request #58596 from rburing/joints_disconnect_connected_signals
`Joint2D` and `Joint3D`: disconnect only connected signals
2022-02-28 11:00:14 +01:00
Haoyu Qiu 3a439a9c03 Fix AnimatedSprite infinite loop 2022-02-28 16:00:45 +08:00
Ricardo Buring 184105e753 Joint2D and Joint3D: disconnect only connected signals 2022-02-27 16:55:57 +01:00
Hugo Locurcio b1a295b739
Implement distance fade properties in OmniLight3D and SpotLight3D
This can be used to fade lights and their shadows in the distance,
similar to Decal nodes. This can bring significant performance
improvements, especially for lights with shadows enabled and when
using higher-than-default shadow quality settings.

While lights can be smoothly faded out over distance, shadows are
currently "all or nothing" since per-light shadow color is no longer
customizable in the Vulkan renderer. This may result in noticeable
pop-in when leaving the shadow cutoff distance, but depending on the
scene, it may not always be that noticeable.
2022-02-25 15:17:35 +01:00
Bastiaan Olij a78a9fee71 Implementing OpenXR driver 2022-02-23 12:02:24 +01:00
Chris Bradfield 849d34ba8e Rename motion_velocity to velocity 2022-02-22 23:31:33 -08:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +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
Rémi Verschelde 1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde 25d4c14fef
Merge pull request #57627 from JFonS/occluder_improvements 2022-02-08 23:23:50 +01:00
Haoyu Qiu bbcd9c5b97 Fix RayCast{2,3}D.clear_exceptions clears parent 2022-02-08 16:31:07 +08:00
jfons dd970482c5 Improvements and fixes to occluders
Improvements:
* Occluder3D is now an abstract type inherited by: ArrayOccluder3D, QuadOccluder3D, BoxOccluder3D, SphereOccluder3D and PolygonOccluder3D. ArrayOccluder3D serves the same purpose as the old Occluder3D (triangle mesh occluder) while the rest are primitives that can be used to manually place simple occluders.
* Occluder baking can now apply simplification. The "bake_simplification_distance" property can be used to set a world-space distance as the desired maximum error, set to 0.1 by default.
* Occluders can now be generated on import. Using the "occ" and "occonly" keywords (similar to "col" and "colonly" for colliders) or by enabling on MeshInstance3Ds in the scene's import window.

Fixes:
* Fixed saving of occluder files after bake.
* Fixed a small error where occluders didn't correctly update in the rendering server.

Bonus content:
* Generalized "CollisionPolygon3DEditor" so it can also be used to edit Resources. Renamed it to "Polygon3DEditor" since it was already being used by other things, not just colliders.
* Fixed a small bug in "EditorPropertyArray" where a call to "remove" was left after the "remove_at" rename.
2022-02-07 13:04:51 +01:00
jmb462 1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Anilforextra adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde f1bff648f2
Merge pull request #57355 from akien-mga/method-bindings-clearer-types 2022-02-01 14:24:35 +01:00
Nathan Franke 8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Rémi Verschelde 1c6f0aa3a0
Merge pull request #56601 from Scony/fix-navigation-obstacle-errors 2022-01-28 23:25:55 +01:00
Rémi Verschelde 7072b359b4
Improve some method bindings to use specific `Object` subtypes
This was made possible by changes to `VariantCaster` which now make
it possible to pass any `Object`-derived type as pointer.
2022-01-28 15:07:22 +01:00
fabriceci cc3c4d6323 Revert #53174 (applying the delta in move and collide), rename rec_vel to distance and improve the doc description 2022-01-26 23:09:30 +01:00
Haoyu Qiu a775744742 Store ObjectID instead of raw pointer for Shape Owners 2022-01-25 17:16:06 +08:00
Rémi Verschelde 2255777fb9
Merge pull request #57144 from AnilBK/fix-pos-dragging 2022-01-24 21:32:38 +01:00
Anilforextra 80187b77a9 Node2D/Node3D: Fix Undraggable Position Property. 2022-01-25 00:52:11 +05:45
fabriceci 856142a97d rename free mode to floating mode 2022-01-24 15:19:43 +01:00
Rémi Verschelde 7e3b92f81f
Merge pull request #55360 from Calinou/rename-bake-mode-properties 2022-01-20 17:35:32 +01:00
Rémi Verschelde dbab0a9487
Merge pull request #56740 from AnilBK/camera-pre-allocate 2022-01-13 11:13:31 +01:00
Anilforextra 8a9c9a67ef CameraMatrix: Pre-allocate Vector in get_projection_planes(). 2022-01-13 10:14:59 +05:45
Rémi Verschelde 929f483ca0
Merge pull request #55446 from Calinou/spritebase3d-remove-opacity 2022-01-12 16:49:57 +01:00
Rémi Verschelde 585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Arnav Vijaywargiya 0c46f73b5e Fixed incorrect property types 2022-01-11 17:17:11 +05:30
Anilforextra c9f5d88f3a Use fill() to fill an entire image instead of setting pixels individually. 2022-01-08 17:43:15 +05:45
Pawel Lampe 9bda2d5859 Fix NavigationObstacle errors
* `NavigationObstacle2D` premature radius estimation (before entering the tree)
* `NavigationObstacle3D` premature radius estimation (before entering the tree)
2022-01-07 19:55:22 +01:00
SaracenOne 726fbb821b Fix incorrect default transform values on foreign 3D nodes 2022-01-06 15:52:22 +00:00
Rémi Verschelde 6af77c7b09
Merge pull request #53684 from TokageItLab/orthogonal-mode 2022-01-05 16:05:40 +01:00
Fernando Cosentino ca79373d13
Added material_overlay property to MeshInstance3D
Applying overlay materials into multi-surface meshes currently
requires adding a next pass material to all the surfaces, which
might be cumbersome when the material is to be applied to a range
of different geometries. This also makes it not trivial to use
AnimationPlayer to control the material in case of visual effects.
The material_override property is not an option as it works
replacing the active material for the surfaces, not adding a new pass.

This commit adds the material_overlay property to GeometryInstance3D
(and therefore MeshInstance3D), having the same reach as
material_override (that is, all surfaces) but adding a new material
pass on top of the active materials, instead of replacing them.
2022-01-05 11:47:51 +01:00
Rémi Verschelde 026de65e5f
Merge pull request #56491 from hinlopen/n3d-minor-improvement
Minor code improvements in Node3D
2022-01-05 08:49:11 +01:00
Stijn 805155e2f6 Minor code improvements in Node3D. Refactor Node3D::show/hide/set_visible to a shared implementation. 2022-01-04 23:22:49 +01:00
Rémi Verschelde ba2bdc478b
Style: Remove inconsistently used `@author` docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Rémi Verschelde eab30316ee
Merge pull request #55332 from Calinou/voxelgidata-tweak-default-dynamic-range
Decrease the default dynamic range in VoxelGIData to 2.0
2022-01-04 17:18:28 +01:00
Rémi Verschelde 851fb16350
Merge pull request #56305 from Calinou/rename-lod-threshold 2022-01-04 15:28:06 +01:00
JFonS 6c25d05f70
Merge pull request #55370 from Calinou/geometryinstance3d-lod-fade-node-configuration-warning
Emit node configuration warnings for GeometryInstance3D distance fade
2022-01-04 13:58:32 +01:00
Rémi Verschelde 2536d6ca20
Merge pull request #55331 from Calinou/voxelgidata-fix-dynamic-range-property 2022-01-04 09:59:26 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Hugo Locurcio df09bc38cb
Rename Lod Threshold to Mesh Lod Threshold
This makes it more obvious that the setting only affects mesh LOD,
not manual (H)LOD achieved using visibility ranges.
2021-12-29 00:11:50 +01:00
Silc 'Tokage' Renew 61759da5b3 Fix some gizmo behavior to make more consistent 2021-12-25 03:24:04 +09:00
Hugo Locurcio e962900f23
Rename and reorder bake mode properties for consistency
The order now goes from least to most computationally expensive:

- Disabled
- Static
- Dynamic
2021-12-14 12:01:12 +01:00
William Deurwaarder 742f072c59 GPULightMapper: convert colors of lights to linear
To make baked colors of lights equal to dynamic colors of lights they have to be
converted to linear as the colors of dynamic lights are converted to linear by
RendererSceneRenderRD.
2021-12-11 13:01:07 +01:00
PouleyKetchoupp 940f3fde5c Improve RigidDynamicBody force and torque API
Makes the API for forces and impulses more flexible, easier to
understand and harmonized between 2D and 3D.

Rigid bodies now have 3 sets of methods for forces and impulses:
-apply_impulse() for impulses (one-shot and time independent)
-apply_force() for forces (time dependent) applied for the current step
-add_constant_force() for forces that keeps being applied each step

Also updated the documentation to clarify the different methods and
parameters in rigid body nodes, body direct state and physics servers.
2021-12-10 15:55:40 -07:00
Steve Szilágyi 0c352407d8 VehicleWheel can now return the surface it's colliding with.
Fixed PR issues.

Update vehicle_body_3d.cpp

Apply suggestions from code review

Co-authored-by: Camille Mohr-Daurat <pouleyKetchoup@gmail.com>
2021-12-10 13:22:02 +01:00
Rémi Verschelde 3c448437f6
Merge pull request #55263 from RPicster/ParticleMaterial-random-start-color 2021-12-10 10:06:46 +01:00
Rémi Verschelde f455660e93
Merge pull request #55572 from aaronfranke/ci-double 2021-12-10 10:02:38 +01:00
Aaron Franke e9808e3d9a
Add a double-precision editor build to CI 2021-12-09 09:52:48 -06:00
Nathan Franke 49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Jonathan Gollnick 0c14b930ef
Fix _validate_property on AnimatedSprite 2D and 3D 2021-12-08 16:59:11 -06:00
Hugo Locurcio c5550108c8
Decrease the default dynamic range in VoxelGIData to 2.0
This reduces visible banding in indirect lighting and reflections.
Sharp reflections now match more closely the original scene.

The downside of this change is that clipping may appear in reflections
in extremely bright scenes, but this should not be a concern in most
scenes.
2021-12-08 00:28:17 +01:00
Hugo Locurcio cf936ae0dd
Rename GPUParticles attractor and collision nodes to have a 3D suffix
GPUParticles attractors and collision are currently only available in 3D.
Their 2D counterparts haven't been implemented yet, but they will use
separate nodes.
2021-12-08 00:21:05 +01:00
Raffaele Picca 76e2c87f57 Fixed sphere emission shape to emit particles in a spheres volume and added "Sphere Surface" to keep the old behaviour. 2021-12-06 20:48:02 +01:00
kobewi 30e1478d0f Remove ProximityGroup3D node 2021-12-06 17:01:51 +01:00
Rémi Verschelde ede7614fe2
Merge pull request #55544 from V-Sekai/audio_camera_null_mitigation 2021-12-06 14:19:40 +01:00
Pedro J. Estébanez 441928c7e3 Fix WorldEnvironment node warning about unset resources 2021-12-03 20:04:50 +01:00
Raffaele Picca ddf82697d7 Random initial color parameter for ParticleMaterial
Works with 2D and 3D GPU Particles
2021-12-03 13:58:17 +01:00
Rémi Verschelde 892a5a72cd
Merge pull request #55474 from akien-mga/copy-operators-no-reference 2021-12-02 17:34:45 +01:00
Rémi Verschelde ced07100d7
Merge pull request #53287 from Chaosus/sprite3d_fix 2021-12-02 16:23:33 +01:00
Rémi Verschelde 7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Hugo Locurcio 1b59818fb3
Remove redundant SpriteBase3D `opacity` property
The `opacity` property is superseded by the GeometryInstance3D
`transparency` property. It works the opposite way (0.0 is opaque,
1.0 is fully transparent), but provides the same behavior in a more
universal manner.
2021-11-29 16:13:55 +01:00
Hugo Locurcio 3135c6f03e
Emit node configuration warnings for GeometryInstance3D distance fade
The visibility range begin/end margin properties must be set above 0.0
for the fade transition to be visible.
2021-11-26 21:46:32 +01:00
Raffaele Picca 459e2a4b6f Fixed texture animation speed when using random lifetime ( Particle2D gpu + cpu) as mentioned here: https://github.com/godotengine/godot/issues/54993 2021-11-26 01:12:23 +01:00
Hugo Locurcio 4e593b3e9a
Fix VoxelGIData dynamic range property being treated as integer
Floating-point values are accepted as dynamic range settings.

This also clamps the lowest value to 1.0, as there's no practical
use case for going below 1.0 (it introduces clipping without
improving precision).
2021-11-26 00:47:31 +01:00
Lightning_A e078f970db Rename `remove()` to `remove_at()` when removing by index 2021-11-23 18:58:57 -07:00
fabriceci ed9b18be94 Fix horizontal velocity being always reset when the body hit a wall in 3d 2021-11-23 11:29:29 +01:00
Camille Mohr-Daurat 66ba19a435
Merge pull request #55202 from fabriceci/fix-wall-acceleration-in-3d
Fix wall acceleration in move and slide (3D)
2021-11-22 08:27:56 -07:00
fabriceci a86d73ef3b Fix body stuck in some 3d advanced scenario 2021-11-22 13:36:51 +01:00
fabriceci b738af86da Fix wall acceleration in move and slide (3D) 2021-11-21 17:09:49 +01:00
Hugo Locurcio 652fd9ffcc
Remove outdated comments related to the 20-layer editor limitation
All 32 layers are now exposed in the editor.
2021-11-18 23:02:40 +01:00
Hugo Locurcio 8fb7e622a6
Rename built-in `SGN()` macro to `SIGN()`
This matches the name of the GDScript function (except it's uppercase
here).
2021-11-16 20:40:49 +01:00
Camille Mohr-Daurat 11e03ae7f0
Merge pull request #54810 from nekomatata/area-separate-override-modes
Separate space override modes for gravity/damping in Area
2021-11-11 15:11:21 -07:00
PouleyKetchoupp c3ae7ddedd Add raycast options to hit when starting inside / hit back faces
Makes the results consistent for all shape types with options to set
the desired behavior.
2021-11-10 17:43:35 -07:00
Rémi Verschelde 3668312e78
Merge pull request #54847 from nekomatata/fix-test-move-regression 2021-11-10 20:38:49 +01:00
PouleyKetchoupp 5da057adaf Fix test_move reporting collision when touching another body
Reporting rest collision information is needed for move_and_collide and
move_and_slide so floor detection can be done properly, but in the case
of just testing the motion for collision, it makes sense to return false
if the body is able to move all along the path without being stopped.

Updated the logic in test_move and clarified the documentation for
test_move and move_and_collide.
2021-11-10 11:20:02 -07:00
PouleyKetchoupp bfd0d33244 Fix errors in CharacterBody when floor is destroyed or removed
In all physics servers, body_get_direct_state() now silently returns
nullptr when the body has been already freed or is removed from space,
so the client code can detect this state and invalidate the body rid.

In 2D, there is no change in behavior (just no more errors).

In 3D, the Bullet server returned a valid direct body state when the
body was removed from the physics space, but in this case it didn't
make sense to use the information from the body state.
2021-11-10 08:27:33 -07:00
PouleyKetchoupp 3d1c123d45 Separate space override modes for gravity/damping in Area
Also make inspector clearer for gravity point properties.
2021-11-09 10:29:24 -07:00
Andrii Doroshenko (Xrayez) 6742a338a8 Rename `GradientTexture` to `GradientTexture1D`
1. Explicit and unambiguous when comparing to `GradientTexture2D`
2. Consistent with other class names where 1D is used in the engine.
2021-11-07 15:11:04 +02:00
Rémi Verschelde 13aaa73124
Merge pull request #54573 from nekomatata/query-parameters 2021-11-05 21:52:39 +01:00
PouleyKetchoupp acbd24ea84 Use parameter classes instead of arguments for all physics queries
Same as what is already done for shape queries, applied to point and ray
queries. Easier to document and more flexible to add more parameters.

Also expose intersect_point method to script in 3D.
Remove intersect_point_on_canvas in 2D, replaced with a parameter.
2021-11-04 11:44:39 -07:00
Hugo Locurcio c012fbc8b2
Rename `PROPERTY_USAGE_NOEDITOR` to `PROPERTY_USAGE_NO_EDITOR`
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
Rémi Verschelde a2803f3d86
Merge pull request #54072 from KoBeWi/hrcr_is_ded 2021-11-03 17:31:48 +01:00
Rémi Verschelde 87ddc5bbbf
Merge pull request #54104 from Scony/improve-navigation-obstacles
Improve NavigationObstacle3D usability
2021-11-03 10:13:53 +01:00
Rémi Verschelde 81c93caf02
Merge pull request #54471 from rafallus/callable_area_monitor 2021-11-02 23:20:41 +01:00
clayjohn b7445f1ff8 Validate fog volume properties 2021-11-01 21:38:04 -07:00