CircleCollider2D.radius returning the same value no matter the scale

I’m writing a script that simulates gravity, and I wanted to set the max distance for the gravity to be depending on the Planets mass and scale. I use whatis called a Sphere of influence, so I need to use the radius of the planets. The problem is that in my formula I use CircleCollider2D.radius, but it always returns the same value, no matter how big or small I set the scale for the planet. I can’t seem to figure out how to do this.

EDIT: I have 2 planets, one has double the scale of the other one, but the CircleCollider2D.radius returns 1.41 and 1.5

CircleCollider.radius is the radius property on the CircleCollider. Changing the scale of the GameObject does not change this property, even though the collider changes size in game space. If you change the radius value, you’ll see a change when you read it.

What specifically are you going for here? There’s probably still a way to do it.

The radius will not change relative to it’s scale. What Unity is thinking is this:

Size = Scale * Radius

So when you change the Scale it’s Size changes, not it’s Radius.

You’ll see this at this link too: Box collider2d's size not changing - Questions & Answers - Unity Discussions

You can find the relative radius by doing something like Radius * gameObject.transform.scale.