How to change the radius of a BoundingSphere?

As the question says" how do you change the radius of a bounding sphere?

I can’t see why this code doesn’t work…


Sphere mesh;

mesh = new Sphere(5, 5, .2f); // <- little mesh

BoundingSphere bs = new BoundingSphere();

bs.setRadius(22f); // <- big boundingSPhere


// meshCone.updateBound(); // <-- makes no difference

Geometry geo = new Geometry(“geo1”);




What am I doing wrong?

Thanks in advance.

The bounding sphere is calculated from the mesh and as far as I’ve been able to tell it can’t be changed.

I even extended Mesh once just so I could provide my own bounding shape.

There was a bug fixed with bounding sphere generation recently. Make sure you’re using nightly jME3 version

1 Like

Great. Thanks for the responses.