vrm-c / vrm-specification

vrm specification
232 stars 36 forks source link

[VRMC_springBone_extended_collider] 疑似コード #473

Closed ousttrue closed 2 months ago

ousttrue commented 3 months ago

疑似コードの最後、座標更新まで書ききった方が親切

            // ジョイントとコライダーの距離の方向。衝突している場合、この方向にジョイントを押し出す
            if (distance < 0)
            {
                var direction = -delta.normalized;
                nextTail -= direction * distance;
            }
ousttrue commented 3 months ago

capsule inside の疑似コード

let dot = dot(offsetToTail, delta);
// 👆👇行の順番
var delta = jointPosition - transformedOffset;