Sliding crane with height

This commit is contained in:
nothke
2024-08-19 23:01:26 +02:00
parent 19f2d59054
commit d2d75ad9a6
3 changed files with 324 additions and 119 deletions

View File

@@ -37,7 +37,7 @@ public class CranePickDrop : MonoBehaviour
if (otherRb && otherRb.isKinematic == false && state == State.Idle)
{
handlingBody = otherRb;
crane.testTgt = handlingBody.transform;
crane.targetTransform = handlingBody.transform;
state = State.Catching;
}
}
@@ -71,7 +71,7 @@ public class CranePickDrop : MonoBehaviour
if (magnet.IsCloseTo(handlingBody, 2f))
{
crane.testTgt = null;
crane.targetTransform = null;
state = State.WaitingToCatch;
timer = 3;
@@ -84,7 +84,7 @@ public class CranePickDrop : MonoBehaviour
if (timer < 0)
{
state = State.Tansporting;
crane.testTgt = dropTarget;
crane.targetTransform = dropTarget;
}
}