Commit Graph

1240 Commits

Author SHA1 Message Date
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
fabriceci 10e63b8dd6 backport moving_platform_apply_velocity_on_leave 2022-01-07 12:54:49 +01:00
Rémi Verschelde b197de6f5f
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2022-01-07 00:14:54 +01:00
Hugo Locurcio 299d277c9c
Warn when using GPU-based particles on macOS due to low performance
On macOS, Particles rendering is much slower than CPUParticles
due to transform feedback being implemented on the CPU instead
of the GPU.
2022-01-06 00:10:32 +01:00
Jake Young 09bc9eb101
Backport NavigationServer with RVO2 to `3.x`
Change the entire navigation system.
Remove editor prefix from nav mesh generator class. It is now used for baking
at runtime as well.
Navigation supports obstacle avoidance now with the RVO2 library.
Nav system will also automatically link all nav meshes together to form one
overall complete nav map.
2022-01-05 16:00:56 +01:00
Steve Szilágyi 285b816f1f
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>
(cherry picked from commit 0c352407d8)
2021-12-10 19:01:06 +01:00
Raffaele Picca 6dd593d579 Random initial color for all Particle Nodes 2021-12-10 16:35:25 +01:00
Raffaele Picca 28a6d32971 Fixed texture animation speed when using random lifetime 2021-12-09 19:59:24 +01:00
lawnjelly 3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
Hugo Locurcio 19de92636d
Tweak ReflectionProbe update mode property hint to mention performance
This is similar to the property hint used in `master`.
2021-11-26 19:20:26 +01:00
Marcel Admiraal 4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
Rémi Verschelde 4103b0b7d8
Merge pull request #50823 from fbcosentino/3d-material-overlay 2021-11-16 08:21:18 +01:00
Fernando Cosentino cc8846bef6 Added material_overlay property to MeshInstance
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 GeometryInstance
(and therefore MeshInstance), 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.

Implemented in rasterizer of both GLES2 and GLES3.
2021-11-15 23:50:34 +00:00
Rémi Verschelde 89792e5c49
Merge pull request #54921 from lawnjelly/portals_roaming_margin 2021-11-15 22:45:46 +01:00
lawnjelly 788f075b44 Portals - Allow user to set roaming expansion margin
Previously a crude metric was used to decide on the roaming expansion margin, but it created unexpected results in some scenarios. Instead this setting is exposed to the user via the RoomManager, allowing them to tailor it to the world size, room sizes, roaming objects sizes and the speeds of movement.
2021-11-12 15:46:04 +00:00
Rémi Verschelde 5752457854
Merge pull request #54911 from akien-mga/3.x-modules-check-enabled 2021-11-12 14:49:39 +01:00
Rémi Verschelde 6f4858f184
Modules: Make sure to include `modules_enabled.gen.h` where needed
Fixes #51677.

Co-authored-by: Arkadiusz Marcin Kołek <aksoftware91@gmail.com>
2021-11-12 13:45:33 +01:00
PouleyKetchoupp 1560c8b5aa 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:07:32 -07:00
PouleyKetchoupp b93aeec4a2 Fix errors in KinematicBody 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-09 15:15:40 -07:00
Rémi Verschelde 8923e2d449
Merge pull request #54038 from nekomatata/fix-soft-body-memory-corruption-3.x 2021-11-09 00:01:00 +01:00
Rémi Verschelde 14ef65e49b
Merge pull request #54348 from akien-mga/3.x-clang-format-dont-align-operands 2021-10-28 15:43:15 +02:00
Rémi Verschelde 1b65550ec7
clang-format: Various fixes to comments alignment from `clang-format` 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Rémi Verschelde 42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Rémi Verschelde 187f293189
Merge pull request #54154 from bjauny/fix_areanotification 2021-10-27 20:38:55 +02:00
Bastien JAUNY a6ca61797c Checking validity of world reference before using it. Fix #54094. 2021-10-27 19:32:44 +02:00
Kemikal1 fa2feb9bec
Change the unreacheable return value of shape_find_owner()
(cherry picked from commit 563d3dbf94)
2021-10-23 11:57:10 +02:00
SeleckyErik 98c0ffb749 Add BAKE_ERROR_NO_ROOT to BakedLightmap
Add new error type to BakeError to signalise that there is no root node to
start baking from.
Document the new error type, as well as BAKE_ERROR_NO_LIGHTMAPPER.
2021-10-21 13:32:03 +02:00
PouleyKetchoupp 67635bfcc2 Fix SoftBody memory corruption when switching mesh at runtime
When switching the mesh at runtime, the physics server wasn't properly
updated with the new mesh. Now we keep track of the soft body mesh to
make sure everything is properly initialized on pre-draw.

Also cleaned a few things around private methods.
2021-10-20 10:52:38 -07:00
Hugo Locurcio dc3b614a6a
Tweak AudioStreamPlayer3D property hints for usability
This also improves the documentation for the `max_distance` property.

(cherry picked from commit b383181851)
2021-10-18 11:24:42 +02:00
Rémi Verschelde f6784e18d1
Merge pull request #53848 from MaxLap/backport_doc_shape_signals 2021-10-15 18:54:43 +02:00
Maxime Lapointe f3002c62b7 Improve area/body_shape_entered/exited signals parameter names and doc
Fix some typoed names from the doc
Add _index to "index" parameters of *_shape_* signals, this is both in doc and in the template. This makes the code, signature and doc easier to understand
Add method to get Node from the _index params of those signals. This was not as easy to find as one would expect. Putting this information where it is needed will help.
2021-10-15 11:28:17 -04:00
Red Headphone 066f214654
no limit of negative value for engine_force (VehicleBody class)
(cherry picked from commit fff70a6427)
2021-10-15 12:51:42 +02:00
Haoyu Qiu 52ebe5993e
Use loop instead of recursion when clearing proximity groups
(cherry picked from commit 6072f38bb1)
2021-10-10 12:27:51 +02:00
Haoyu Qiu ff27b994cd Re-prepare VisualServer if SoftBody mesh changed 2021-10-06 23:25:14 +08:00
Rémi Verschelde 69437eb746
Merge pull request #53012 from lawnjelly/portals_unload_reason 2021-10-05 12:00:43 +02:00
kleonc e2e149f4df Fix rendering centered odd-size texture in AnimatedSprite/AnimatedSprite3D 2021-10-03 14:15:21 +02:00
PouleyKetchoupp 304102f66f Optimize AABB calculation in software skinning
Using min/max instead of regular AABB for optimal processing.
2021-09-28 10:11:04 -07:00
Rémi Verschelde d4d4603827
Merge pull request #53144 from nekomatata/software-skinning-aabb
Update mesh AABB when software skinning is used
2021-09-28 07:27:23 +02:00
PouleyKetchoupp 941cff4157 Update mesh AABB when software skinning is used
Not updating the mesh properly can cause rendering issues in some cases,
like shadows not updating properly.
2021-09-27 11:56:58 -07:00
lawnjelly 279e6f65cd Portals - add reason string to unload message
To help users identify conditions that are causing room system invalidation, a reason message is passed to the unload function and logged.
2021-09-24 14:00:24 +01:00
Rémi Verschelde 044cafc31a
Merge pull request #52894 from laws65/3d-skeleton-bone-fix 2021-09-23 12:10:26 +02:00
PouleyKetchoupp 8b562543df Don't override KinematicCollision reference when still in use in script
In case the reference is stored in script, create a new instance to
avoid overriding the previous values.
Otherwise, re-use the reference as before to avoid extra allocations.
2021-09-22 18:15:03 -07:00
PouleyKetchoupp ad5e70cde4 Fix moving platforms with ray shapes
In the case of ray shapes, the body RID used to apply platform velocity
wasn't properly set.
2021-09-21 09:00:23 -07:00
laws65 d1bacb53fd Prevent being able to set bone's parent as itself 2021-09-21 22:06:03 +09:30
Rémi Verschelde b37776fa2f
Merge pull request #52591 from timothyqiu/error-macros
[3.x] Remove do{ } while(0) wrapper around error macros
2021-09-21 10:38:34 +02:00
Camille Mohr-Daurat bb885c5704
Merge pull request #52369 from bengtsts/3.x
Expose soft body pin methods to GDScript
2021-09-17 06:19:54 -07:00
Bengt Söderström 73b9b84995 Expose soft body pin methods to GDScript 2021-09-17 11:25:31 +02:00
Hugo Locurcio 7922c262f6
Display a editor gizmo icon for Listener
The icon was present in `editor/icons/`, but it was never implemented
in the editor gizmos code.

This also removes some unused gizmo drawing code (overridden methods
that are no longer called anywhere).
2021-09-16 23:37:12 +02:00
Rémi Verschelde 20f14e0a16
Merge pull request #52586 from JFonS/lm_bake_end
Fix editor getting stuck after baking lightmaps from a script
2021-09-14 22:40:48 +02:00