Allow customising the time until sleep for a rigid body

This commit is contained in:
fabriceci
2023-01-23 16:05:21 +01:00
parent 1a4183cc94
commit 4ff84319a0
2 changed files with 7 additions and 4 deletions

View File

@@ -176,8 +176,7 @@ impl IslandManager {
update_energy(&mut rb.activation, sq_linvel, sq_angvel, dt);
if rb.activation.time_since_can_sleep >= RigidBodyActivation::default_time_until_sleep()
{
if rb.activation.time_since_can_sleep >= rb.activation.time_until_sleep {
// Mark them as sleeping for now. This will
// be set to false during the graph traversal
// if it should not be put to sleep.