Skip to content

Commit

Permalink
VrmSpringBone デバッグ表示がずれているのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ruyo committed Jun 17, 2024
1 parent 37f68bd commit 801feee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Source/VRM4U/Private/AnimNode_VrmSpringBone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ void FAnimNode_VrmSpringBone::ConditionalDebugDraw(FPrimitiveDrawInterface* PDI,

float r = (c.radius) * 100.f;
auto offs = c.offset;
offs.Set(offs.X, offs.Y, -offs.Z);
offs.Set(offs.X, -offs.Z, offs.Y);
offs *= 100;
offs = t.TransformVector(offs);

Expand All @@ -286,7 +286,7 @@ void FAnimNode_VrmSpringBone::ConditionalDebugDraw(FPrimitiveDrawInterface* PDI,
else {

auto tail = c.tail;
tail.Set(tail.X, tail.Y, -tail.Z);
tail.Set(tail.X, -tail.Z, tail.Y);
tail *= 100;
tail = t.TransformVector(tail);

Expand Down Expand Up @@ -362,7 +362,8 @@ void FAnimNode_VrmSpringBone::ConditionalDebugDraw(FPrimitiveDrawInterface* PDI,
for (const auto &col : colMeta.collider) {
float r = (col.radius) * 100.f;
auto offs = col.offset;
offs.Set(-offs.X, offs.Z, offs.Y);
//offs.Set(offs.X, -offs.Z, offs.Y); // 本来はこれが正しいが、VRM0の座標が間違っている
offs.Set(-offs.X, offs.Z, offs.Y); // VRM0の仕様としては これ
offs *= 100;
FVector v = t.TransformPosition(offs);

Expand Down

0 comments on commit 801feee

Please sign in to comment.