mirror of
https://github.com/nothke/quality-control.git
synced 2025-08-08 23:03:43 +00:00
Sliding crane art and fixing
This commit is contained in:
@@ -52,6 +52,7 @@ public class CranePickDrop : MonoBehaviour
|
||||
if (state == State.Catching)
|
||||
{
|
||||
Debug.Assert(handlingBody, this);
|
||||
Debug.Assert(magnet, this);
|
||||
|
||||
magnet.strength = magnetStrength;
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user