Commit graph

16 commits

Author SHA1 Message Date
reduz d03b7fbe09 Refactored Node3D rotation modes
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis

Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25 14:34:00 -03:00
Aaron Franke eb4902a455
Fix some unnecessary includes 2021-08-13 00:27:38 -05:00
Aaron Franke a3c29ed899
Rename files and the exposed name for Transform3D 2021-06-03 07:30:01 -04:00
Aaron Franke de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
TwistedTwigleg dbd17ebf30 SkeletonIK: Fixed issue where bones become detached if multiple SkeletonIK nodes are used
(Forward port of 3.X code for Godot 4)
2021-05-25 21:30:40 -04:00
TwistedTwigleg 318a81f619 Fix for SkeletonIK not working correctly with 0 interpolation and incorrectly rotating with animation. Now the root bone rotates differently to ensure it always rotates correctly and works with BoneAttachment3D nodes. 2021-04-02 13:47:19 -04:00
Rémi Verschelde a19ffe80da
Merge pull request #40774 from TwistedTwigleg/SkeletonIK_Godot_4_0_Fixes
SkeletonIK changes and bug fixes
2021-03-12 11:25:29 +01:00
Rafał Mikrut 003bb8e1a8 Initialize class variables with default values in scene/ [1/2] 2021-02-07 22:29:31 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
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 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal 3e1c540a6e Remove ChainTip copy constructor 2020-12-07 12:29:29 +00:00
TwistedTwigleg a622649876 Changes to SkeletonIK:
* 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.
2020-09-08 17:50:36 -04:00
Marcel Admiraal 26fcf2b04c Add override keywords. 2020-07-10 13:56:54 +01:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00
lupoDharkael 95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Rémi Verschelde d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Renamed from scene/animation/skeleton_ik.h (Browse further)