问题修改
This commit is contained in:
@@ -60,8 +60,11 @@ namespace AibisDream
|
||||
transform.position = targetPos;
|
||||
var tempShaft = gearController.CheckClosestShaft(transform.position, radius);
|
||||
if (!tempShaft) return;
|
||||
|
||||
targetShaft = gearController.CheckGearSuitable(tempShaft, radius) ? tempShaft : null;
|
||||
|
||||
if (gearController.CheckGearSuitable(tempShaft, radius))
|
||||
{
|
||||
targetShaft = tempShaft;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,9 +241,9 @@ namespace AibisDream
|
||||
// 寻找所有临接轴
|
||||
for (int i = 0; i < _vertexSize; i++)
|
||||
{
|
||||
if (i != idx) continue; // 不需要计算和自身的关系
|
||||
if (i == idx) continue; // 不需要计算和自身的关系
|
||||
float availableDis = Shaft.CalcShaftAvailableDis(sourceShaft.transform.position, _vertexArray[i]);
|
||||
if (availableDis > gearRadius - 0.15f)
|
||||
if (availableDis < gearRadius - 0.15f)
|
||||
{
|
||||
isShaftAvailable = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user