Open ghost opened 7 years ago
This is issue applies to both nphysics
and ncollide
actually. Dynamically-resizing a shape has two non-trivial implications:
In any cases, this feature can be added, but one should keep in mind that changing the scaling factor of a shape is a very costly operation because some coherence data and pre-computed informations have to be recomputed at each rescale.
A simpler alternative than using a Similarity3
would be to allow the user to dynamically change the shape of a rigid body, e.g., with a .set_shape(...)
method.
Apologies if this is the wrong repo, but it looks like
ncollide
is the proper one to add file this under. I have code that looks like this:I would like to dynamically resize the object later on. The shape is getting stored as
ncollide::shape::ShapeHandle<nalgebra::Point3<{float}>, nalgebra::Isometry3<{float}>>
. Since annalgebra::Isometry3
struct is being used to store the state of the shape, only translation and rotation can be updated. It appears that if annalgebra::Similarity3
struct were to be used instead, scaling could be set dynamically.