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