Commit Graph

2004 Commits

Author SHA1 Message Date
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
Micky eb0cc08a23 Rename AudioStreamPlayer3D's `unit_db` to `volume_db`
AudioStreamPlayer3D.`unit_db` -> `volume_db`

Now matches the same name AudioStreamPlayer and AudioStreamPlayer2D use.
2022-09-17 16:06:30 +02:00
fabriceci a72d5be2c6 Add recovery_as_collision in move_and_collide/test_move 2022-09-17 11:40:03 +02:00
Hugo Locurcio 7dee32ad14
Tweak LightmapGI defaults to be closer to the CPU lightmapper
- Use 3 bounces by default.
- Enable environment lighting from the scene by default.
  - This is not done in `3.x` for compatibility with existing projects,
    but it makes sense to do this by default since pretty much all
    outdoor scenes benefit from this.
- Set the custom environment color to white (like ReflectionProbe).
  - Its default energy is still 0, so it's invisible by default.
- Enable the generation of dynamic object probes by default.
- Tweak the `max_texture_size` property hint for better usability.
- Improve error messages when passing invalid sizes to
  `LightmapGI.set_max_texture_size()`.
2022-09-16 16:27:00 +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
clayjohn 1b5f422c73 Validate physical light units in GI classes.
Add checks for physical light units in a few more places to ensure they aren't used when disabled.
2022-09-14 17:39:25 -07: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 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
Micky a7ce7b1d3f Fix AudioStreamPlayer not resuming after returning to SceneTree 2022-09-05 16:52:46 +02:00
Rémi Verschelde 904d8bdb3c
Merge pull request #65292 from AlmightyLaxz/prevent-shapecast3d-debug-without-debugcollisions 2022-09-05 13:59:51 +02:00
Haoyu Qiu f0f24b9a62 Fix crash when executing `LightmapGIData._set_light_textures_data` 2022-09-04 20:43:25 +08:00
Almighty Laxz 44042a957f Stop ShapeCast3D drawing when debug collisions off 2022-09-04 02:28:30 +09:30
Hugo Locurcio f7292dbeb3
Rename `or_lesser` range property hint to `or_less`
"less" should be used for quantity, rather than "lesser".

Existing scripts that use `or_lesser` in `_get_property_list()`
will need to be updated to account for this change.
2022-09-02 19:08:20 +02:00
Rémi Verschelde 3a62c294c7 Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray 2022-09-02 13:57:02 +02:00
Rémi Verschelde 4fa3675ffa Merge pull request #65218 from xX-Void-Xx/area2d/3d-optimization 2022-09-02 13:53:28 +02:00
Rémi Verschelde c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
Void fdfe11d4b3 fixed and optimized Area2/3D get_overlapping_bodies/areas
fixed a type and made it so area3d get_overlapping_x is similar to its counterpart func in area2d so that it uses TypedArray instead of Array and ERR_FAIL_COND_V_MSG instead of no message, also minimized array resize calls
2022-09-02 12:00:04 +01:00
Jonathan Nicholl 15d057c521 Add `is_zero_approx` methods to `Vector2`, `3`, and `4` 2022-09-02 00:29:50 -04:00
Rémi Verschelde 005aac2dbe Merge pull request #65187 from JohanAR/vector_to_size 2022-09-01 23:50:59 +02:00
Rémi Verschelde 2e0cffdb6f Merge pull request #63479 from DarkKilauea/nav-link 2022-09-01 23:44:22 +02:00
Johan Aires Rastén b7e2d45233 Replace Vector2(i) with Size2(i) for methods returning a size 2022-09-01 20:04:17 +02:00
Rémi Verschelde ca59f47f31
Merge pull request #64157 from Mickeon/remove-mysterious-is-playing 2022-09-01 17:40:32 +02:00
kobewi 7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
Yuri Rubinsky 8191b3c110 Rename `uniform` to `parameter` across the engine 2022-09-01 11:42:57 +03:00
Rémi Verschelde 89f0886425
Merge pull request #65073 from bruvzg/trim_spaces
[TextServer] Add support for trimming edge spaces on line break.
2022-09-01 08:16:52 +02:00
bruvzg 7aad14a4b6
[TextServer] Add support for trimming edge spaces on line break. 2022-09-01 08:11:55 +03:00
clayjohn 385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
Rémi Verschelde d58a1d65a9
Merge pull request #63413 from Calinou/volumetric-fog-add-per-light-energy-2
Add a per-light volumetric fog energy property
2022-08-31 08:47:03 +02:00
Rémi Verschelde 96b470b28e
Merge pull request #63394 from Calinou/curve-gradient-rename-interpolate
Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`
2022-08-31 08:37:12 +02:00
Hugo Locurcio ae18928748
Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`
"sampling" is a more accurate term than "interpolating" for what's
happening when using that function.
2022-08-30 22:08:38 +02:00
Rémi Verschelde c24c67858a
Merge pull request #65087 from TokageItLab/change-skeleton-3d-api
Clean-up/change some Skeleton3D API
2022-08-30 21:18:19 +02:00
Hugo Locurcio 09bedcead4
Add a per-light volumetric fog energy property
Per-light energy gives more control to the user on the final result of
volumetric fog. Specific lights can be fully excluded from volumetric fog
by setting their volumetric fog energy to 0, which improves performance
slightly. This can also be used to prevent short-lived dynamic effects
from poorly interacting with volumetric fog, as it's updated over several
frames by default unless temporal reprojection is disabled.

Volumetric fog shadows now obey Light3D's Shadow Opacity property as well.

The shadow fog fade property was removed as it had little visible impact
on the final scene's rendering.
2022-08-30 20:03:38 +02:00
Silc Renew 28b11e216a Clean-up/change some Skeleton3D API 2022-08-30 23:03:12 +09:00
Nong Van Tinh 76b4041f38 Fixed surface material overrides are not applied when the new mesh is set 2022-08-30 12:43:59 +07:00
rafallus 7f2740f7bd Expose input interaction virtual functions in CollisionObject 2022-08-29 14:04:52 +02:00
Rémi Verschelde e60086f98b
Merge pull request #64119 from YuriSizov/theme-init-database 2022-08-29 14:02:21 +02:00
Josh Jones 3dd59013f4 Added node for Navigation links 2022-08-26 22:05:15 -07:00
Rémi Verschelde f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Yuri Sizov 6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
Micky 59e11934d8 Rename `str2var` to `str_to_var` and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
fabriceci f8cc88fab3 Restore RigidBody2/3D, SoftBody names in physics 2022-08-26 12:26:25 +02:00
Rémi Verschelde 4bcb625dae
Merge pull request #63528 from bruvzg/fix_lbl3d_oversampling 2022-08-26 11:44:02 +02:00
Rémi Verschelde af692912d4
Merge pull request #54646 from jmb462/fix-animatedsprite-animation-list
Fix AnimatedSprite2D & 3D animation list in inspector
2022-08-26 08:22:51 +02:00
Micky 723bf85145 Rename ParticlesMaterial to ParticleProcessMaterial
Also affects their file names, related classes and documentation.
2022-08-26 02:53:08 +02:00
jmb462 ae9560af82 Fix AnimatedSprite2D & 3D animation list in inspector 2022-08-26 00:05:58 +02:00
Rémi Verschelde 88145e81e2
Merge pull request #64804 from Mickeon/rename-path-progress 2022-08-25 18:35:48 +02:00
Rémi Verschelde af88438c71
Merge pull request #64354 from Mickeon/rename-navigation-distance 2022-08-25 18:35:23 +02:00
Rémi Verschelde 78033235bb
Merge pull request #64802 from benbot/master 2022-08-25 17:50:51 +02:00
fabriceci 31549dca29 Shorten variable names for moving platforms in CharacterBody 2022-08-25 09:15:18 +02:00
Rémi Verschelde 1204ad32d1
Merge pull request #64829 from fabriceci/improve-monitor-contact-api
Improves the API for monitoring contacts in RigidDynamicBody
2022-08-25 07:31:06 +02:00
benbot 9c1bcdcf1a removes unused skeleton functions and stray comments in RigidDynamicBody3D 2022-08-24 16:49:39 -04:00
fabriceci 59bf35f3df Improves the API for monitoring contacts in RigidDynamicBody 2022-08-24 21:23:11 +02:00
Rémi Verschelde 2961651444
Merge pull request #64691 from TokageItLab/Quaternion-editor 2022-08-24 18:36:54 +02:00
Silc Renew 673c649adb Implement Quaternion Editor 2022-08-24 22:04:49 +09:00
Rémi Verschelde b556d8c9a0
Merge pull request #64370 from Mickeon/rename-marker-node
Rename Position* nodes to Marker*
2022-08-24 08:52:13 +02:00
Rémi Verschelde 91e5f48ea7
Merge pull request #64009 from KoBeWi/arrayy_lmao
Replace Array return types with TypedArray (part 2)
2022-08-24 08:18:56 +02:00
Micky bb936b2e27 Rename PathFollow's `offset`s to `progress` & `progress_ratio`
Applies for both PathFollow2D and PathFollow3D
2022-08-24 01:56:03 +02:00
kobewi 1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
Micky 8bb305356e Rename Position* nodes to Marker*
- Position2D -> Marker2D
- Position3D -> Marker3D

Also changes their respective file names.
2022-08-23 19:49:50 +02:00
Rémi Verschelde 2adfcc60e2 Joint3D: Remove utility method bindings for angular limits
The inspector now supports converting degrees to radians automatically when
using the `radians` hint, so all those utility bindings were redundant.

This cleans things up by making these properties with slash properly bound
to `set_param`/`get_param` which the users can call with the relevant enum.
2022-08-23 11:57:44 +02:00
Rémi Verschelde 7764151bc1 Rename properties unnecessarily using slash (`/`) in their names
This is a legacy of Godot 2 days before the inspector had support for groups.
"Properties" with a slash in their name can't be accessed from script unless
using `set()`/`get()` so they were not actual properties as far as script
languages are concerned.

Part of #17558.
2022-08-23 11:57:43 +02:00
kobewi 8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Rémi Verschelde 1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property 2022-08-22 21:39:48 +02:00
Rémi Verschelde 7b4927bb5f
Merge pull request #60309 from The-O-King/oct 2022-08-22 19:29:21 +02:00
Yuri Sizov 1a24c9e14b Make `_validate_property` a multilevel method 2022-08-22 18:35:11 +03:00
Rémi Verschelde af76fb4567
Merge pull request #63486 from TokageItLab/init-poses 2022-08-22 17:32:02 +02:00
Rémi Verschelde 5193332d10
Merge pull request #64343 from TokageItLab/priority-ph 2022-08-22 17:31:23 +02:00
Rémi Verschelde fdc36ad082
Merge pull request #64553 from RedMser/fix-property-validation-refactor 2022-08-22 16:54:47 +02:00
Paul Joannon 6bc0be16a5
Expose the collider RID in Raycast nodes
Create and expose the method `get_collider_rid` in `RayCast2D` and `Raycast3D`.
This method returns the `RID` of the first object that the ray intersects, or an empty `RID` if no object is intersecting the fay (i.e. `is_colliding` returns `false`).
2022-08-22 09:18:08 +02:00
Omar El Sheikh 2425d798cd Octahedral Normal Support for Sprite and Soft Body
Properly encode the normal and tangent vectors with octahedral
compression
2022-08-20 10:01:46 -07:00
Yuri Sizov 469c18152f
Merge pull request #64592 from mhilbrunner/move-fast-break-things
Unexpose VelocityTracker3D
2022-08-19 20:43:02 +03:00
Yuri Sizov 7895a66cf2
Merge pull request #64334 from YuriSizov/core-bind-property-revert-methods
Make `property_*_revert` methods multilevel and expose them for scripting
2022-08-19 20:41:41 +03:00
Max Hilbrunner da567cb1f9 Unexpose VelocityTracker3D 2022-08-19 02:28:24 +02:00
RedMser c25b8f2876 Remove unintentional PROPERTY_USAGE_INTERNAL
The flag only matters for property definition,
but was also used in _validate_property a lot.
2022-08-18 16:25:00 +02:00
RedMser 83f2723893 Fix some property validation not been refactored 2022-08-18 16:24:15 +02:00
Silc Renew b27fe6452d add init bone poses 2022-08-18 18:41:37 +09:00
Silc Renew b31115cdc1 Add collision weight to PhysicsBody for penetrations must be avoided
Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2022-08-18 08:10:31 +09:00
Yuri Sizov 980f5f32f4 Make `property_*_revert` methods multilevel and expose them for scripting 2022-08-18 00:03:53 +03:00
Hugo Locurcio 0f95db6786
Hide properties that have no effect in Label3D inspector
- Use the disabled GI mode as Label3D can't contribute to GI in any way.
- Improve Label3D class documentation.
2022-08-15 18:41:32 +02:00
smix8 5162d9ac8b Fix NavigationObstacle 2D/3D (re)parent issues
Fixes (re)parent issues with NavigationObstacle 2D and 3D (same as NavigationAgents).
Also adds the option from NavigationAgents to override the default navigation map.
2022-08-14 16:23:27 +02:00
Micky b62d06fbed Rename Navigation's `neighbor_dist` to `neightbor_distance`
NavigationAgent2D/3D.`neighbor_dist` -> `neighbor_distance` (also affects setters and getters)

NavigationServer2D/3D.`agent_set_neighbor_dist()` -> `agent_set_neighbor_distance()`

Also changes their parameters' names.

Doesn't affect "Agent.neighborDist_" in Agent.h
2022-08-13 12:40:55 +02:00
Hugo Locurcio 126114cfda
Fix ORMMaterial3D not being taken into account by static VoxelGI 2022-08-11 21:39:05 +02:00
Rémi Verschelde e9e9e92e48
Merge pull request #64147 from smix8/fix_navigationregion3d_debug_doublerender_4.x
Fix NavigationRegion3D debug mesh rendering twice in Editor
2022-08-11 09:42:38 +02:00
Rémi Verschelde edf07ee7a6
Merge pull request #64160 from Calinou/tweak-label3d-defaults 2022-08-10 11:48:39 +02:00
Silc Renew 7331295523 add get_depth() to KinematicCollision3D as same of 2D 2022-08-10 10:33:58 +09:00
Hugo Locurcio a13d8578e0
Tweak Label3D defaults for better readability
- Increase font size and decrease pixel size.
  - The font is rendered at the same physical size, but is more detailed,
    which is visible when the camera is up close.
- Add an outline to improve readability on mixed-color backgrounds.
  - The outline is fairly thick to ensure it doesn't get too grainy
    at a distance (without requiring MSDF or mipmaps on the default
    project font).
2022-08-09 16:26:28 +02:00
Micky 83f96139ac Remove AnimatedSprite3D.`is_playing()` for redundancy
Also removes the underscore prefix from `_set_playing()` and `_is_playing()`
2022-08-09 13:20:07 +02:00
smix8 0e4c31ce57 Fix NavigationRegion3D debug mesh rendering twice in Editor
Fixes double rendering of NavigationRegion3D debug mesh due to both 3DGizmo and runtime debug rendering the mesh at the same time.
2022-08-09 11:12:03 +02:00
Rémi Verschelde d9d5990c51
Merge pull request #64034 from DarkKilauea/fix-nav-region-gizmo 2022-08-08 22:37:00 +02:00
Rémi Verschelde bc81c02fe1
Merge pull request #62571 from Calinou/gpuparticlescollisionsdf3d-add-bake-mask 2022-08-08 10:18:11 +02:00
Rémi Verschelde b712727515
Merge pull request #64068 from DarkKilauea/fix-region-travel-cost 2022-08-08 08:55:02 +02:00
Josh Jones 8c324132d0 Fix typo when setting NavigationRegion travel_cost 2022-08-07 10:40:33 -07:00
Hugo Locurcio baaa7503c7
Add a shadow opacity property to Light3D
This can be used to make shadows translucent for a specific light.

The light distance fade system also uses this to smoothly fade the shadow
when the light fade transition distance is greater than 0.
2022-08-07 11:06:32 +02:00