-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement LookAtModifier3D #98446
Implement LookAtModifier3D #98446
Conversation
2d49ab5
to
e28301c
Compare
34a2b00
to
84d3d88
Compare
5971a16
to
51d0b43
Compare
Added:
|
dd3d3e2
to
4a2c99a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed and tested during the Animation Meeting and everyone seems satisfied that it works and adds broadly useful functionality. 👍
It is also worth noting that it largely follows the spec put forward by the VRM consortium https://github.com/vrm-c/vrm-specification/blob/master/specification/VRMC_vrm-1.0/lookAt.md
c327fac
to
78c3f53
Compare
e3f8338
to
6fc061b
Compare
Thanks! |
@TokageItLab Thanks, I've been waiting for modifiers for skeletons for a long time! |
@JekSun97 Please review and contribute to the discussion here godotengine/godot-proposals#9885 (Needed Skeleton Modifiers) |
I think there's a typo on the Documentation data This is visible at the documentation page at https://docs.godotengine.org/en/latest/classes/class_lookatmodifier3d.html Location 1: Location 2: And on PS: I've created an Issue for this at #99532 |
Add a LookAtModifier3D. This modifier allows you to specify a forward axis and provides a two-axis Euler rotation to prevent roll the forward axis.
lkat001.mp4
SkeletonModifier3D
as refactoring for nodes that may modifySkeleton3D
#87888Features
Time-based interpolation
When the character changes the lock-on target, it will take a certain amount of time to rotate instead of immediately rotating its head. The time-based interpolation uses a tween, so several transition/easing types can be selected.
lkat002.mp4
Angle limitation
This option allows you to prevent the character's neck from rotating 360 degrees. The limitation means that half angle of the limit from the bone rest is the range of motion. Both symmetrical and non-symmetrical limitations are supported.
Also, when this option is enabled, time-based interpolation will provide rest-aware rotation, similar to AnimationTree blending. This means that in some cases the shortest path will not be selected to prevent bones from penetrating through the body. See also for-better-blending.
In addition, if the target moves outside of these limits, axis flipping may occur, where time-based interpolation is used.
lkat003.mp4
Non-linear damping
To prevent abrupt changes in angular velocity at the edge of the angular limit, the option is to start non-linear(b-spline) damping from the threshold value.
This helps simulate natural human motion.
lkat004.mp4
Origin setting
There are some cases where multiple bones need to always point in the same direction, such as the eyes.
For example, angle limitation may cause bone to flip outside their limits, which is not good because only one of the eyes will move significantly. Setting an arbitrary origin helps to solve this problem.
Origin from
For example, To solve the above problem, it is possible to set the head to origin for eyes. Or you can use BoneAttachment or parent-child Node3D.
Offset
The problem can be addressed by matching the origin by offset without any external node or bone as well.
lkat005.mp4