mirror of
https://github.com/DCFApixels/Unity-DebugX.git
synced 2025-09-17 17:34:35 +08:00
fix raycast2d
This commit is contained in:
parent
e0de4101b0
commit
7b33438c5c
@ -32,6 +32,12 @@ namespace DCFApixels
|
||||
}
|
||||
return this;
|
||||
}
|
||||
[IN(LINE)]
|
||||
private void RaycastHit_Internal(float offsetZ, RaycastHit2D hit)
|
||||
{
|
||||
DotDiamond(new Vector3(hit.point.x, hit.point.y, offsetZ));
|
||||
RayArrow(new Vector3(hit.point.x, hit.point.y, offsetZ), hit.normal);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@ -153,7 +159,7 @@ namespace DCFApixels
|
||||
{
|
||||
Line(origin, origin + (Vector3)direction * hit.distance);
|
||||
|
||||
RaycastHit(hit);
|
||||
RaycastHit_Internal(origin.z, hit);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@ -177,7 +183,7 @@ namespace DCFApixels
|
||||
Line(origin, end);
|
||||
WireCircle(end, Normal2D, radius);
|
||||
|
||||
RaycastHit(hit);
|
||||
RaycastHit_Internal(origin.z, hit);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@ -202,7 +208,7 @@ namespace DCFApixels
|
||||
Line(origin, end);
|
||||
WireQuad(end, rotation, size * 2f);
|
||||
|
||||
RaycastHit(hit);
|
||||
RaycastHit_Internal(origin.z, hit);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@ -228,7 +234,7 @@ namespace DCFApixels
|
||||
Line(origin, end);
|
||||
WireFlatCapsule(end, rotation, radius, height);
|
||||
|
||||
RaycastHit(hit);
|
||||
RaycastHit_Internal(origin.z, hit);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user