Skip to content

Commit 801feee

Browse files
committed
VrmSpringBone デバッグ表示がずれているのを修正
1 parent 37f68bd commit 801feee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Source/VRM4U/Private/AnimNode_VrmSpringBone.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ void FAnimNode_VrmSpringBone::ConditionalDebugDraw(FPrimitiveDrawInterface* PDI,
272272

273273
float r = (c.radius) * 100.f;
274274
auto offs = c.offset;
275-
offs.Set(offs.X, offs.Y, -offs.Z);
275+
offs.Set(offs.X, -offs.Z, offs.Y);
276276
offs *= 100;
277277
offs = t.TransformVector(offs);
278278

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

288288
auto tail = c.tail;
289-
tail.Set(tail.X, tail.Y, -tail.Z);
289+
tail.Set(tail.X, -tail.Z, tail.Y);
290290
tail *= 100;
291291
tail = t.TransformVector(tail);
292292

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

0 commit comments

Comments
 (0)