Fix BroadPhase proxy handle recycling causing a crash.

This commit is contained in:
Sébastien Crozet
2020-08-27 09:01:32 +02:00
parent cd3d4e0bff
commit 3b000f90bf
10 changed files with 308 additions and 148 deletions

View File

@@ -66,8 +66,8 @@ pub fn init_world(testbed: &mut Testbed) {
/*
* Setup a callback to control the platform.
*/
testbed.add_callback(move |bodies, _, _, _, time| {
let mut platform = bodies.get_mut(platform_handle).unwrap();
testbed.add_callback(move |_, physics, _, _, time| {
let mut platform = physics.bodies.get_mut(platform_handle).unwrap();
let mut next_pos = platform.position;
let dt = 0.016;