comment infinite loop avoidance

This commit is contained in:
Quaternions 2025-01-09 20:38:32 -08:00
parent ca003edbc3
commit 0dc462a3b1

View File

@ -1138,6 +1138,7 @@ impl PhysicsContext{
collector.collect(minkowski.predict_collision_in(relative_body,collector.time())
//temp (?) code to avoid collision loops
.map_or(None,|(face,dt)|{
// this must be rounded to avoid the infinite loop when hitting the start zone
let time=relative_body.time+dt.into();
if time<=state.time{None}else{Some((time,face,dt))}})
.map(|(time,face,dt)|