Magnet no longer sticking to itself, and crane stuff

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

No files matched your search

+1 -1
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);