Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Character Plugin
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
Character Plugin
Commits
415bee63
Commit
415bee63
authored
Jan 31, 2024
by
Jonathan Ehret
Browse files
Options
Downloads
Patches
Plain Diff
readd direct setting for small angles, to,e.g., improve fixating while an animation is running
parent
cfdaeab6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Source/CharacterPlugin/Private/AnimNodes/AnimNode_VHGazing.cpp
+11
-0
11 additions, 0 deletions
...e/CharacterPlugin/Private/AnimNodes/AnimNode_VHGazing.cpp
with
11 additions
and
0 deletions
Source/CharacterPlugin/Private/AnimNodes/AnimNode_VHGazing.cpp
+
11
−
0
View file @
415bee63
...
...
@@ -224,6 +224,17 @@ void FAnimNode_VHGazing::UpdateCurrentRotation(FGazingBoneData& GazingBoneData,
FQuat
TargetRotQuat
=
TargetRotation
.
Quaternion
();
const
float
Angle
=
FMath
::
RadiansToDegrees
(
CurrRotQuat
.
AngularDistance
(
TargetRotQuat
));
//float MinAngle = DeltaTime * GazingPartData.MaxVelocity;
const
float
MinAngle
=
5.0f
;
//the above would somewhat make more sense, during testing, however, this magic number performed much better...
if
(
Angle
<
MinAngle
&&
GazingBoneData
.
AmplitudeCurrMovement
==
0.0f
)
{
// any rotation below MinAngle, is directly applied to avoid jittering etc. with moving targets and especially parallel full-body animations
// so if this is only a small correction movement, apply it!
GazingBoneData
.
CurrentRotation
=
TargetRotation
;
return
;
}
//we need to keep track how far this movement went to adapt speeds according to https://doi.org/10.1145/2724731
if
(
Angle
>
GazingBoneData
.
AmplitudeCurrMovement
)
{
GazingBoneData
.
AmplitudeCurrMovement
=
Angle
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment