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)
* 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
While default ReCast library has support for 0.0 'sample_distance' the Godot implementation does not an crashes.
Previously Godot would set all sample_distance values below 0.9 to 0 which causes the crashes.
This limits the sample_distance range selection to 0.1 - 16.0 and also clamps sample_distance that are below 0.1 before ReCast receives them.
(cherry picked from commit e33fa9d833)
Utility functions for NavigationServer2D/3D to find missing RID information when working with Server API directly. e.g. from map to regions and agents, from agent or region to map, from region to map and agents and so on ....
Requirement to work with NavigationServer API exklusive without SceneTree nodes and when juggling agents and regions between multiple navigation maps.
(cherry picked from commit 371054e3e5)
Rewrites the definition of how the function works.
Reworks the style of the examples and adds a negative range example.
Changes the while loop to a range loop in the array backwards example.
(cherry picked from commit b2841ce194)
Adds Warning when users try to bake a NavigationMesh with suspiciously big source geometry and small cellsizes as this baking process will likely fail or result in a NavigationMesh that will create serious pathfinding performance issues.
(cherry picked from commit 79511af7c9)
Gridmaps did not previously show at all when portals were active, due to the instances being created defaulting to static mode, and not being converted during the room conversion stage.
This PR sets gridmap instances to global mode, which enables them to show up when portals are active (using frustum culling only, no occlusion).
When double-clicking on a function name the graph will now correctly jump to the function relative to the zoom ratio.
(cherry picked from commit e8a326a08f)
- improved mesh data calculation from standalone static colliders so that no
VisualServer calls are performed - and thus no VS mutexes need to
be locked in case of on-thread baking
- improved the same for GridMap's static colliders
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.
Each class XML's schema conformance is also checked on GitHub Actions.
It was due to main_shape_changed being called two times for each
added body. The first time it disables ccd, which sets the internal ccd
threshold to be 10000. The second time, it enables ccd again because
the internal threshold is > 0.
Bodies are now consistently set with a ccd threshold of 0 when ccd is
disabled.
This was causing crashing asserts in Bullet when adding bodies in some
scenarios, in btVector3::normalize():
btAssert(!fuzzyZero());
These crashes will still happen with ccd enabled.
(cherry picked from commit faca8b77aa)
This ensures the project setting never disappears from the editor,
even if the current physics engine is GodotPhysics.
This also adds documentation for the Smooth Trimesh Collision
project setting.
This behavior is inconsistent with non tools builds and can create
issues. Instead, a warning is emitted if there's a type mismatch. If the
type can't be converted, an error is shown instead.
For the editor it gives a converted value to avoid issues with the
property editor, which expects the correct type.
Instead of fitting all atlas slices into a single image, which meant there
was a hard limit on the size, BakedLightmap will now save as many images
as needed to fit all the slices generated by the lightmapper.
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.
(cherry picked from commit 1bdb82c64e)
Hostname is now resolved during poll in WebSocketClient (wslay) to avoid
blocking during connect.
An attempt is still made to find the hostname in the resolver cache.
(cherry picked from commit 1ec96bc206)
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.
(cherry picked from commit 90162851a7)
fixes#57231, fixes#57421
Within the context of parsing navigation geometry, this commit:
- added missing transform of `MultiMeshInstance`
- changed all transforms to global ones so that they don't need to be
calculated by hand
By default, when installing from Android App Bundles the native
libraries are not extracted. They are loaded directly from the APK.
See: https://stackoverflow.com/a/56551499
Passing only the file name to dlopen, without the location, makes it
search the native library in all locations, including inside the apk.
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.
Keep applying the windows entropy patch (UWP support).
Remove no longer needed padlock patch.
Update thirdparty README to reflect changes, and new source inclusion
criteria.
(cherry picked from commit e375cbd094)
I don't see any reference to gzip/svgz supported in the nanosvg library,
and the handful of test gzip compressed svgz files I tried failed loading.
Also cleaning a couple missing includes in platform export code.
The command line option is the same you would pass to Mono, but it
begins with `--mono-debugger-agent=` instead of `--debugger-agent=`.
This is useful for platforms where it's difficult for the user to
configure it via environment variables, like Android.
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.
When reloading C# classes and keep their properties values they are
retrieved and stored in a state list.
Retrieving the properties was only getting the fields of the C# class
and not inherited fields so those properties values were lost on reload.
Now we also try to find the field in the parent classes.
When folders are moved/removed from the file system, the `.csproj`
may need to be edited to update the path of C# scripts or remove them.
If a C# solution has not been created, the `.csproj` file does not exist
and therefore there is no need to edit it.
Due to the async nature of WebRTC implementations, the multiplayer peer
could end up having queued packets from a given connection before it is
able to emit the "peer_added" signal.
This commit ensures that packets from peers which are not notified yet
are skipped by `get_packet` and `get_available_packet_count`.
Two main changes:
- Better handling of concave shapes to make sure the queries don't
return a triangle index instead of shape index.
Note: A concave shape within a compound shape will always return a shape
index of 0 because of Bullet limitations.
- Extra check for compound shapes in some queries to avoid undefined
behavior, because the shape index can have an uninitialized value with
convex shapes in some cases.
(cherry picked from commit 02d40de30d)
Removes miniz as a bundled dependency, relies on our own zlib instead.
Includes a couple commits ahead of `v1.0.1` tag to fix MinGW builds.
(cherry picked from commit 46d3effa99)
Moves copy and paste in their own functions so copy_nodes_request and paste_nodes_request are able to work.
Applies paste offset to the last mouse clicked position.
Settings that aren't within a subsection are difficult to reach when
other settings do have a subsection.
This also adds documentation for the project setting.
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.
The hash symbol creates spurious issue references on GitHub if
the message is posted outside a code block, which means some issues
have a lot more references than originally intended.
Godot uses Variant parameters for calls to script methods.
Up until now we were boxing such parameters when marshalling
them for invokation, even if they were value types.
Now Godot allocates the marshalled parameters on the stack,
reducing the GC allocations resulted from boxing.
Keep track of MeshInstance and GeometryInstance override materials in the GLTFMesh object.
Ensure all arrays are non-empty to conform with "minItems":1 in glTF spec.
Fleshed out the "Optimize Mesh" options found in the mesh import UI
Gave a checkbox to every vertex attribute that can be compressed
Surfaced option to enable/disable Octahedral compression for
normal/tangent vectors
Also surfaces the vertex position compression option which previously
inaccessible because the defaults did not compress vertex positions
Supports all current importers (obj, fbx, collada, gltf)
Ensures that the `get_property_list` and `get_script_property_list`
methods push the script properties to the end of the given list, this
prevents the script property from appearing after the script variables.
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`.
GLB chunk padding length calculation was backwards and missing for the BIN chunk.
Fixed error caused by "skins":[] when no skins were present.
Finally, encode animations before textures to avoid accessor misalignment due to texture byteLength.
It triggers a crash when playing V9 videos.
Could likely be fixed if anyone wants to work on it, but so far nobody seems to
want to and WebM support is dropped in 4.0, so this workaround should help for
now.
Fixes#50862.
This provides more realistic lighting with a very small performance cost.
The option is available in both GLES3 and GLES2, and can be enabled in
the Project Settings. This goes well with the ACES Fitted tonemapping mode
that was recently added.
When enabled, this also makes upgrading Godot 3.x projects to Godot 4.0 easier,
since lighting in 3.x will better match how it'll look in Godot 4.0.