Description
I'm testing this out now and I'm having a small issue with it. I removed the calls to UseLocation
and UseAngle
and replaced them with UseSweep
. However, the resulting body doesn't have the same location, or "m_xf
", as the one I serialized it from. It seems that the value of m_xf
is set from the pos0
from the sweep, done from the GetTransformation
here:
Transformation GetTransformation(const BodyConf& conf) noexcept
{
return {conf.sweep.pos0.linear, UnitVec::Get(conf.sweep.pos0.angular)};
}
when the value of x_mf
in the old body is the value of pos1
of the sweep. And I can't call UseLocation
to fix this, because then I will loose the pos0
from the sweep.
I also had to set resetMassData
to false, because otherwise I will also loose the pos0
from the sweep, but I guess I always have to avoid this function if I want an exact copy of a body?
Originally posted by @opera-aberglund in #549 (comment)