Joint API and joint motors improvements
This commit is contained in:
committed by
Sébastien Crozet
parent
e740493b98
commit
fb20d72ee2
@@ -16,11 +16,9 @@ pub fn init_world(testbed: &mut Testbed) {
|
||||
let ground_size = 200.1;
|
||||
let ground_height = 0.1;
|
||||
|
||||
let rigid_body = RigidBodyBuilder::new_static()
|
||||
.translation(vector![0.0, -ground_height, 0.0])
|
||||
.build();
|
||||
let rigid_body = RigidBodyBuilder::new_static().translation(vector![0.0, -ground_height, 0.0]);
|
||||
let handle = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::cuboid(ground_size, ground_height, ground_size).build();
|
||||
let collider = ColliderBuilder::cuboid(ground_size, ground_height, ground_size);
|
||||
colliders.insert_with_parent(collider, handle, &mut bodies);
|
||||
|
||||
/*
|
||||
@@ -55,9 +53,9 @@ pub fn init_world(testbed: &mut Testbed) {
|
||||
Translation::new(x * curr_rad, width * 2.0 + ground_height, z * curr_rad)
|
||||
* tilt
|
||||
* rot;
|
||||
let rigid_body = RigidBodyBuilder::new_dynamic().position(position).build();
|
||||
let rigid_body = RigidBodyBuilder::new_dynamic().position(position);
|
||||
let handle = bodies.insert(rigid_body);
|
||||
let collider = ColliderBuilder::cuboid(thickness, width * 2.0, width).build();
|
||||
let collider = ColliderBuilder::cuboid(thickness, width * 2.0, width);
|
||||
colliders.insert_with_parent(collider, handle, &mut bodies);
|
||||
testbed.set_initial_body_color(handle, colors[i % 2]);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user