Magnet no longer sticking to itself, and crane stuff

This commit is contained in:
nothke
2024-08-17 16:55:28 +02:00
parent fae1548cf4
commit dd1c0284ab
3 changed files with 419 additions and 207 deletions

View File

@@ -13,7 +13,7 @@ public class Magnet : MonoBehaviour
{
var otherRb = other.attachedRigidbody;
if (otherRb)
if (otherRb && otherRb.isKinematic == false)
{
Vector3 dir = otherRb.position - transform.position;
float dirSq = Vector3.SqrMagnitude(dir);