mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-12-11 20:15:10 +01:00
change score to use trigger root since sectors are in the middle of the planet a lot
This commit is contained in:
parent
122dacd071
commit
c3d2e8cee2
@ -78,7 +78,7 @@ public class QSBSector : WorldObject<Sector>
|
||||
|
||||
public float GetScore(OWRigidbody rigidbody)
|
||||
{
|
||||
var sqrDistance = (Transform.position - rigidbody.GetPosition()).sqrMagnitude;
|
||||
var sqrDistance = (AttachedObject._triggerRoot.transform.position - rigidbody.GetPosition()).sqrMagnitude;
|
||||
var radius = GetRadius();
|
||||
var sqrVelocity = GetSqrVelocity(rigidbody);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user