Sliding crane art and fixing

This commit is contained in:
nothke
2024-08-18 16:11:53 +02:00
parent d2c3dff101
commit 464c091655
32 changed files with 4839 additions and 915 deletions

View File

@@ -52,6 +52,7 @@ public class CranePickDrop : MonoBehaviour
if (state == State.Catching)
{
Debug.Assert(handlingBody, this);
Debug.Assert(magnet, this);
magnet.strength = magnetStrength;

View File

@@ -18,16 +18,15 @@ public class SlidingCrane : MonoBehaviour
public Transform testTgt;
public Vector3 target;
public Rigidbody craneRail ;
public Transform cradleTransform;
public Rigidbody cradleRb;
private void Start()
{
target = transform.position;
}
void Update()
void FixedUpdate()
{
if (testTgt)
target = testTgt.position;
@@ -51,5 +50,7 @@ public class SlidingCrane : MonoBehaviour
yTransform.localPosition = new Vector3(0, 0, yMotion.progress * yRange);
xTransform.localPosition = new Vector3(x, 0, 0);
cradleRb.MovePosition(cradleTransform.position);
}
}