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.
Adds fixed timestep interpolation to the visual server.
Switchable on and off with project setting.
This version does not add new API for set_transform etc, when nodes have the interpolated flag set they will always use interpolation.
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)
When editor continuous redraws is switched off, the editor only redraws when a redraw_request was issued by an element in the scene. This works well in most situations, but when scenes have dynamic content they will continuously issue redraw_requests.
This can be fine on high power desktops but can be an annoyance on lower power machines.
This PR splits redraw requests into high and low priority requests, defaulting to high priority. Requests due to e.g. shaders using TIME are assigned low priority.
An extra editor setting is used to record the user preference and an extra option is added to the editor spinner menu, to allow the user to select between 3 modes:
* Continuous
* Update all changes
* Update vital changes
Extra:
- Optimized the debug-only check about why the object is null to determine if it's because it has been deleted (the RC is enough; no need to check the ObjectDB).
- Because of the previous point. the debugger being attached is not required anymore for giving the "Object was deleted" error; from now, it only matters that it's a debug build.
- `is_instance_valid()` is now trustworthy. It will return `true` if, and only if, the last object assigned to a `Variant` is still alive (and not if a new object happened to be created at the same memory address of the old one).
- Replacements of `instance_validate()` are used where possible `Variant::is_invalid_object()` is introduced to help with that. (GDScript's `is_instance_valid()` is good.)
When BlendSpace2D switches animations, it will now correctly
calculate the previous animation position and length and
apply is to the new animation.
(cherry picked from commit bcb1e2b79f)
As a bonus, to have consistency between use Beziers and create insert tracks, use Beziers also gets a default via editor settings that is used when the confirmation dialog is disabled, instead of just falling back to creating non-Bezier tracks.
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.
So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).
This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
(cherry picked from commit c7b53c03ae)
* Removed the pointers to PhysicalBone in the code, as they were unused.
* Forward ported the SkeletonIK bone scaling fix I made from Godot 3.2 to Godot 4.0.
* Fixed issue where the root bone in the IK chain would not rotate correctly.
* The issue turned out to be the update_chain function being called in solve. This would override the root bone transform incorrectly and that would cause it not to rotate after just a single solve. Removing the update_chain function fixes the issue and based on my testing there are no adverse effects.
* While the old fix on this PR (prior to a force push) required a hack fix, this new fix does not!
* Removed the update_chain function. This change doesn't appear to have any adverse effects in any of the projects I tested (including with animations, Skeleton3D or otherwise, from AnimationPlayer nodes!)
* Fixed issue where the scale of the Skeleton node would change the position of the target, causing it not to work with skeletons that have a global scale of anything but 1.
(cherry picked from commit a622649876)
Happy new year to the wonderful Godot community!
2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.
We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)
Here's to a great year 2021 for all Godot users 🎆
(cherry picked from commit b5334d14f7)
This allows the user to query the AnimationNodeStateMachinePlayback's current
play position and total length of current animation state. These methods are currently
used in the editor plugin, but can also be useful for querying general playback state
information.
Added documentation for AnimationNodeStateMachinePlayback's `get_current_play_position`
(cherry picked from commit 674fb52f52)