set density/inertia for computed mesh
This commit is contained in:
parent
cf34ab5a63
commit
830d371e36
|
@ -482,6 +482,8 @@ fn spawn_entities(
|
||||||
actor.insert(AngularVelocity(state.angular_momentum));
|
actor.insert(AngularVelocity(state.angular_momentum));
|
||||||
actor.insert(ColliderDensity(state.density));
|
actor.insert(ColliderDensity(state.density));
|
||||||
if state.collider_is_mesh {
|
if state.collider_is_mesh {
|
||||||
|
actor.insert(MassPropertiesBundle::new_computed(
|
||||||
|
&Collider::sphere(0.5 * state.model_scale as f64), state.density));
|
||||||
actor.insert(AsyncSceneCollider::new(Some(
|
actor.insert(AsyncSceneCollider::new(Some(
|
||||||
ComputedCollider::TriMesh
|
ComputedCollider::TriMesh
|
||||||
//ComputedCollider::ConvexDecomposition(VHACDParameters::default())
|
//ComputedCollider::ConvexDecomposition(VHACDParameters::default())
|
||||||
|
|
Loading…
Reference in a new issue