fix snapshots in 2d examples (#875)
This commit is contained in:
@@ -1248,21 +1248,17 @@ fn update_testbed(
|
||||
state
|
||||
.action_flags
|
||||
.set(TestbedActionFlags::TAKE_SNAPSHOT, false);
|
||||
// FIXME
|
||||
println!(
|
||||
"!!!!!!!!! Snapshots are not working any more. Requires broad-phase serialization."
|
||||
);
|
||||
// state.snapshot = PhysicsSnapshot::new(
|
||||
// harness.state.timestep_id,
|
||||
// &*harness.physics.broad_phase,
|
||||
// &harness.physics.narrow_phase,
|
||||
// &harness.physics.islands,
|
||||
// &harness.physics.bodies,
|
||||
// &harness.physics.colliders,
|
||||
// &harness.physics.impulse_joints,
|
||||
// &harness.physics.multibody_joints,
|
||||
// )
|
||||
// .ok();
|
||||
state.snapshot = PhysicsSnapshot::new(
|
||||
harness.state.timestep_id,
|
||||
&harness.physics.broad_phase,
|
||||
&harness.physics.narrow_phase,
|
||||
&harness.physics.islands,
|
||||
&harness.physics.bodies,
|
||||
&harness.physics.colliders,
|
||||
&harness.physics.impulse_joints,
|
||||
&harness.physics.multibody_joints,
|
||||
)
|
||||
.ok();
|
||||
|
||||
if let Some(snap) = &state.snapshot {
|
||||
snap.print_snapshot_len();
|
||||
|
||||
@@ -411,7 +411,7 @@ Hashes at frame: {}
|
||||
serialization_time.as_secs_f64() * 1000.0,
|
||||
timestep_id,
|
||||
bf.len() as f32 / 1000.0,
|
||||
format!("{:?}", hash_bf).split_at(10).0,
|
||||
format!("{hash_bf:?}").split_at(10).0,
|
||||
nf.len() as f32 / 1000.0,
|
||||
format!("{hash_nf:?}").split_at(10).0,
|
||||
bs.len() as f32 / 1000.0,
|
||||
|
||||
Reference in New Issue
Block a user