aboutsummaryrefslogtreecommitdiff
path: root/examples2d/platform2.rs
diff options
context:
space:
mode:
authorSébastien Crozet <developer@crozet.re>2022-03-19 16:23:09 +0100
committerSébastien Crozet <sebastien@crozet.re>2022-03-20 21:49:16 +0100
commita9e3441ecd64d50b478ab5370fabe187ec9a5c39 (patch)
tree92b2e4ee3d3599a446f15551cc74e8e71b9c6150 /examples2d/platform2.rs
parentdb6a8c526d939a125485c89cfb6e540422fe6b4b (diff)
downloadrapier-a9e3441ecd64d50b478ab5370fabe187ec9a5c39.tar.gz
rapier-a9e3441ecd64d50b478ab5370fabe187ec9a5c39.tar.bz2
rapier-a9e3441ecd64d50b478ab5370fabe187ec9a5c39.zip
Rename rigid-body `static` to `fixed`
Diffstat (limited to 'examples2d/platform2.rs')
-rw-r--r--examples2d/platform2.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples2d/platform2.rs b/examples2d/platform2.rs
index 325e7ce..c240518 100644
--- a/examples2d/platform2.rs
+++ b/examples2d/platform2.rs
@@ -16,7 +16,7 @@ pub fn init_world(testbed: &mut Testbed) {
let ground_size = 10.0;
let ground_height = 0.1;
- let rigid_body = RigidBodyBuilder::new_static().translation(vector![0.0, -ground_height]);
+ let rigid_body = RigidBodyBuilder::fixed().translation(vector![0.0, -ground_height]);
let handle = bodies.insert(rigid_body);
let collider = ColliderBuilder::cuboid(ground_size, ground_height);
colliders.insert_with_parent(collider, handle, &mut bodies);
@@ -37,7 +37,7 @@ pub fn init_world(testbed: &mut Testbed) {
let y = j as f32 * shift + centery;
// Build the rigid body.
- let rigid_body = RigidBodyBuilder::new_dynamic().translation(vector![x, y]);
+ let rigid_body = RigidBodyBuilder::dynamic().translation(vector![x, y]);
let handle = bodies.insert(rigid_body);
let collider = ColliderBuilder::cuboid(rad, rad);
colliders.insert_with_parent(collider, handle, &mut bodies);
@@ -47,8 +47,8 @@ pub fn init_world(testbed: &mut Testbed) {
/*
* Setup a position-based kinematic rigid body.
*/
- let platform_body = RigidBodyBuilder::new_kinematic_velocity_based()
- .translation(vector![-10.0 * rad, 1.5 + 0.8]);
+ let platform_body =
+ RigidBodyBuilder::kinematic_velocity_based().translation(vector![-10.0 * rad, 1.5 + 0.8]);
let velocity_based_platform_handle = bodies.insert(platform_body);
let collider = ColliderBuilder::cuboid(rad * 10.0, rad);
colliders.insert_with_parent(collider, velocity_based_platform_handle, &mut bodies);
@@ -56,7 +56,7 @@ pub fn init_world(testbed: &mut Testbed) {
/*
* Setup a velocity-based kinematic rigid body.
*/
- let platform_body = RigidBodyBuilder::new_kinematic_position_based()
+ let platform_body = RigidBodyBuilder::kinematic_position_based()
.translation(vector![-10.0 * rad, 2.0 + 1.5 + 0.8]);
let position_based_platform_handle = bodies.insert(platform_body);
let collider = ColliderBuilder::cuboid(rad * 10.0, rad);