mirror of
https://github.com/nothke/quality-control.git
synced 2025-08-08 23:03:43 +00:00
Crane minor changes
This commit is contained in:
@@ -29,6 +29,11 @@ public class CranePickDrop : MonoBehaviour
|
||||
{
|
||||
var otherRb = sender.triggeredCollider.attachedRigidbody;
|
||||
|
||||
if (!otherRb.GetComponent<Product>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (otherRb && otherRb.isKinematic == false && state == State.Idle)
|
||||
{
|
||||
handlingBody = otherRb;
|
||||
@@ -58,8 +63,11 @@ public class CranePickDrop : MonoBehaviour
|
||||
state = State.Idle;
|
||||
return;
|
||||
}
|
||||
|
||||
magnet.strength = magnetStrength;
|
||||
|
||||
if (magnet.IsCloseTo(handlingBody, 5f))
|
||||
{
|
||||
magnet.strength = magnetStrength;
|
||||
}
|
||||
|
||||
if (magnet.IsCloseTo(handlingBody, 2f))
|
||||
{
|
||||
|
Reference in New Issue
Block a user