|
@@ -78,19 +78,19 @@ namespace Wheels
|
|
|
{
|
|
|
var deltaY = fwDist <= rwDist ? fwDist : rwDist;
|
|
|
bike.Translate(0,-deltaY,0);
|
|
|
- Debug.Log($"Translated {-deltaY} on y");
|
|
|
+ //Debug.Log($"Translated {-deltaY} on y");
|
|
|
}
|
|
|
else if (fw.distance >= THRESHOLD)
|
|
|
{
|
|
|
var angle = Mathf.Atan(fw.distance / distRwFw) * Mathf.Rad2Deg;
|
|
|
- Debug.Log($"Rotating {angle} deg");
|
|
|
+ //Debug.Log($"Rotating {angle} deg");
|
|
|
bike.RotateAround(rearWheelContactPoint.position, rearWheelContactPoint.right, angle);
|
|
|
}
|
|
|
else if (rw.distance >= THRESHOLD)
|
|
|
{
|
|
|
var angle = Mathf.Atan(rw.distance / distRwFw) * Mathf.Rad2Deg;
|
|
|
bike.RotateAround(frontWheelContactPoint.position, frontWheelContactPoint.right, -angle);
|
|
|
- Debug.Log($"Rotating {-angle} deg");
|
|
|
+ //Debug.Log($"Rotating {-angle} deg");
|
|
|
}
|
|
|
|
|
|
//if ((fwHit?.even ?? true) && (rwHit?.even ?? true)) return;
|