Skip to content

Commit

Permalink
remove interpolation to avoid bad interpolation when using quaternions
Browse files Browse the repository at this point in the history
  • Loading branch information
guillefix committed Feb 1, 2023
1 parent c799c40 commit 4cb4140
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"additionalProbingPaths": [
"C:\\Users\\Guillermo Valle\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Guillermo Valle\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages",
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackagesFallback",
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder"
]
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,18 @@ public void OnUpdate(float T)
if (bone == null)
{
positions[i].InsertKeyFrame(new float3(0,0,0), T);
rotations[i].InsertKeyFrame(new floatQ(0, 0, 0, 1), T);
//rotations[i].InsertKeyFrame(new floatQ(0, 0, 0, 1), T);
rotations[i].InsertKeyFrame(new floatQ(0, 0, 0, 1), T, interpolation: KeyframeInterpolation.Hold);
if (scl) scales[i].InsertKeyFrame(new float3(1, 1, 1), T);
} else if (localSpace[i]) {
positions[i].InsertKeyFrame(bone.LocalPosition, T);
rotations[i].InsertKeyFrame(bone.LocalRotation, T);
//rotations[i].InsertKeyFrame(bone.LocalRotation, T);
rotations[i].InsertKeyFrame(bone.LocalRotation, T, interpolation: KeyframeInterpolation.Hold);
if (scl) scales[i].InsertKeyFrame(bone.LocalScale, T);
} else {
positions[i].InsertKeyFrame(ruut.GlobalPointToLocal(bone.GlobalPosition), T);
rotations[i].InsertKeyFrame(ruut.GlobalRotationToLocal(bone.GlobalRotation), T);
//rotations[i].InsertKeyFrame(ruut.GlobalRotationToLocal(bone.GlobalRotation), T);
rotations[i].InsertKeyFrame(ruut.GlobalRotationToLocal(bone.GlobalRotation), T, interpolation: KeyframeInterpolation.Hold);
if (scl) scales[i].InsertKeyFrame(ruut.GlobalScaleToLocal(bone.GlobalScale), T);
}
}
Expand Down
2 changes: 1 addition & 1 deletion metagen/metagen.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<Reference Include="System.Threading.Tasks">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\NeosVR\Neos_Data\Managed\System.Threading.Tasks.dll</HintPath>
</Reference>
<Reference Include="C:\Program Files (x86)\Steam\steamapps\common\NeosVR\System.ValueTuple.dll"/>
<Reference Include="C:\Program Files (x86)\Steam\steamapps\common\NeosVR\System.ValueTuple.dll" />
<Reference Include="UnityEngine">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\NeosVR\Neos_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
Expand Down

0 comments on commit 4cb4140

Please sign in to comment.