Add a 2D demo for locking rotation.

This commit is contained in:
Crozet Sébastien
2020-11-30 15:41:32 +01:00
parent 715d0fe16e
commit 1e0f76b02c
7 changed files with 73 additions and 11 deletions

View File

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