You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So i have this code here experimenting with the new set_kind function. As stated in the documentation before i update the kind
i also update the mass and intertia, making sure they are fine.
But after the call to the rigidbody_set_kind i get an asset for the mass telling me it's not in the valid range.
I set it before the call to set_kind having these check there passing and everything is valid.
I suspect the entity changes are not processed before the set_kind message is
void rigidbody_assert_supports_kind(entt::registry ®istry, entt::entity entity, rigidbody_kind kind) {
if (kind == rigidbody_kind::rb_dynamic) {
auto &mass = registry.get<edyn::mass>(entity);
EDYN_ASSERT(mass > EDYN_EPSILON && mass < large_scalar, "Dynamic rigid body must have non-zero mass.");
auto &inertia = registry.get<edyn::inertia>(entity);
EDYN_ASSERT(inertia != matrix3x3_zero, "Dynamic rigid body must have non-zero inertia.");
}
}
This commit should fix it 4c5795e
Also, you should be using edyn::set_rigibody_mass and edyn::set_rigidbody_inertiaand you can also now destroy a rigid body while preserving the entity usingedyn::clear_rigidbody`.
So i have this code here experimenting with the new set_kind function. As stated in the documentation before i update the kind
i also update the mass and intertia, making sure they are fine.
But after the call to the rigidbody_set_kind i get an asset for the mass telling me it's not in the valid range.
I set it before the call to set_kind having these check there passing and everything is valid.
I suspect the entity changes are not processed before the set_kind message is
The text was updated successfully, but these errors were encountered: