Crane logic fixes

This commit is contained in:
nothke
2024-08-17 16:29:47 +02:00
parent b2d8ac944c
commit 41ed2e559f
3 changed files with 13 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ public class CranePickDrop : MonoBehaviour
magnet.strength = magnetStrength;
crane.testTgt = handlingBody.transform;
if (Vector3.Distance(handlingBody.position, magnet.transform.position) < 1f)
if (magnet.IsCloseTo(handlingBody, 2f))
{
crane.testTgt = dropTarget;
state = State.Tansporting;