fix TryCollideCapsuleAndSphere

This commit is contained in:
ousttrue
2024-11-30 00:14:45 +09:00
parent 7fe84e533e
commit 6ebf6a779b

View File

@@ -128,9 +128,9 @@ namespace UniVRM10.ClothWarp.Jobs
out LineSegment resolved
)
{
var P = (capsuleTail - capsuleHead).normalized;
var P = (capsuleTail - capsuleHead);
var Q = b - capsuleHead;
var dot = Vector3.Dot(P, Q);
var dot = Vector3.Dot(P.normalized, Q);
if (dot <= 0)
{
// head側半球の球判定