mirror of
https://github.com/nothke/quality-control.git
synced 2025-08-30 07:23:43 +00:00
Fixing small bugs.
This commit is contained in:
@@ -15,6 +15,11 @@ public class Magnet : MonoBehaviour
|
||||
|
||||
if (otherRb && otherRb.isKinematic == false)
|
||||
{
|
||||
if (!otherRb.GetComponent<Product>())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 dir = otherRb.position - transform.position;
|
||||
float dirSq = Vector3.SqrMagnitude(dir);
|
||||
float forceMagnitude = strength * (1.0f / dirSq);
|
||||
|
Reference in New Issue
Block a user