10 Months Ago
Fixed items dropped on Tugboat sometimes causing tugboat physics stall. Dropped items now use Continuous Speculative. Removed DroppedMode covar. When Unity detects a bad Continuous or Continuous Dynamic collision - i.e. one that looks like it will pass through an object between ticks - it stops the object immediately in place. This is the reason why modular cars must use Discrete physics collision and by extension why we need the Vehicle World physics layer to supply big chunky colliders, and the additional lastPosWasBad checks in ModularCar.Server VehicleFixedUpdate. If we used continuous, cars would occasionally come to an unexplained complete halt when driving fast on rough terrain. Continuous Speculative is a different thing entirely - more like Discrete collision, but the collider bounds extend into the space where they'll be during the next tick. At our low 16Hz tick rate, this wasn't usable for modular cars either as it turned them into something that felt like a big long surfboard at high speeds. QA discovered a bug where Tugboat physics would sometimes glitch out and come to a stop when items were dropped on it while it was moving. This immediately reminded me of the continuous collision resolution problem above, but Tugboat was already using Continuous Speculative - chosen mainly because Continuous Speculative, being designed to handle even kinematic collisions, behaved relatively well when the Tugboat collided with the moving non-rigidbody Cargo Ship. What I've now found is that the Continuous/Continuous Dynamic "move back to previous pos and set velocity to zero" bad-collision fix seems to apply to both members of a collision, even if one isn't on Continuous/Continuous Dynamic. Dropped items were Continuous Dynamic by default, and moving them to the Continuous Speculative layer fixes this bug. I don't expect any trouble with the change since they're relatively slow-moving. The dropped item collision mode was on a convar. Since all options except for Continuous Speculative are likely to cause trouble of some sort on moving physics bodies, I've removed the droppedmode convar entirely.