Pausing just the physics

I have a physics game that has ice blocks. When they are hit, I need to freeze all other physics blocks for a timed amount but allow the rest of the game to continue. So if another piece is falling and rotating and a user clicks on the ice block, I need those falling pieces to stop but allow the rest of the game to continue. After the timer runs out, I need those pieces to continue on their path. I already use a collection proxy for the entire game to pause.


not sure that will work, just an idea:

  1. store linear_velocity and angular_velocity for all frezzing block with dynamic collision shape
  2. then setup their linear_damping and angular_damping to 1
  3. after timer, reset damping and set velocity back
  4. drop a line here does it work or not :see_no_evil:

Another option is to have two collision objects for each ice block; one dynamic and one kinematic. The blocks could then be frozen by disabling the dynamic collision object and enabling the kinematic, and vice versa.