naturalSize property
Vector3
get
naturalSize
The shape's size before any scale, for an editor's outline:
size for a box, 2 × radius (and height) for the round ones.
Implementation
Vector3 get naturalSize => switch (shape) {
Collider3DShape.box => Vector3.copy(size),
Collider3DShape.sphere => Vector3(radius * 2, radius * 2, radius * 2),
Collider3DShape.capsule ||
Collider3DShape.cylinder => Vector3(radius * 2, height, radius * 2),
_ => Vector3(1, 1, 1),
};