Is anyone can guide me about how to scale a body that already added in the world in runtime? Or i have too keep on recreate new shape and body when i scale, and addinto simulation again?
var _shape = new Sphere(radius);
_shape.ComputeInertia(mass, out var _bodyInertia);
var _rigidPose = new RigidPose(new Vector3(0,0,0));
var _body = BodyDescription.CreateDynamic(_rigidPose, _bodyInertia, new CollidableDescription(Physic.Shapes.Add((Sphere)_shape), margin), new BodyActivityDescription(0.01f));
That gives a direct memory reference, so changing the radius isn't directly responsible for the slowdown. There might be some consequence of increased size that's causing issues- if the sphere gets so large that it's colliding with a million objects, for example.
Scaling boils down to a change in the shape, so there's no option other than GetShape<T> or remove/readd. There are no special hooks for connecting to external events or anything like that.