diff --git a/README.md b/README.md index 04f6c149e..3c990d9f6 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ fn setup( commands.spawn(( RigidBody::Dynamic, Collider::cuboid(1.0, 1.0, 1.0), - AngularVelocity(Vec3::new(2.5, 3.5, 1.5)), + Velocity::from_angular_xyz(2.5, 3.5, 1.5), Mesh3d(meshes.add(Cuboid::from_length(1.0))), MeshMaterial3d(materials.add(Color::srgb_u8(124, 144, 255))), Transform::from_xyz(0.0, 4.0, 0.0), diff --git a/crates/avian2d/examples/ccd.rs b/crates/avian2d/examples/ccd.rs index 6d6d73d76..f1e3a28e8 100644 --- a/crates/avian2d/examples/ccd.rs +++ b/crates/avian2d/examples/ccd.rs @@ -58,7 +58,7 @@ fn setup(mut commands: Commands) { }, Transform::from_xyz(-200.0, -200.0, 0.0), RigidBody::Kinematic, - AngularVelocity(25.0), + Velocity::from_angular(25.0), Collider::rectangle(1.0, 400.0), // Enable swept CCD for this body. Considers both translational and rotational motion by default. // This could also be on the ball projectiles. @@ -72,7 +72,7 @@ fn setup(mut commands: Commands) { }, Transform::from_xyz(200.0, -200.0, 0.0), RigidBody::Kinematic, - AngularVelocity(-25.0), + Velocity::from_angular(-25.0), Collider::rectangle(1.0, 400.0), // Enable swept CCD for this body. Considers both translational and rotational motion by default. // This could also be on the ball projectiles. @@ -140,7 +140,7 @@ fn spawn_balls( MeshMaterial2d(materials.add(Color::srgb(0.2, 0.7, 0.9))), Transform::from_xyz(0.0, 350.0, 0.0), RigidBody::Dynamic, - LinearVelocity(2000.0 * direction), + Velocity::from_linear(2000.0 * direction), Friction::ZERO.with_combine_rule(CoefficientCombine::Min), Collider::from(circle), )); diff --git a/crates/avian2d/examples/custom_collider.rs b/crates/avian2d/examples/custom_collider.rs index 89708bad8..2928a4f7b 100644 --- a/crates/avian2d/examples/custom_collider.rs +++ b/crates/avian2d/examples/custom_collider.rs @@ -206,7 +206,7 @@ fn setup( ), RigidBody::Dynamic, CircleCollider::new(particle_radius.adjust_precision()), - LinearDamping(0.4), + Damping::from_linear(0.4), )); } } @@ -214,21 +214,21 @@ fn setup( /// Pulls all particles towards the center. fn center_gravity( - mut particles: Query<(&Transform, &mut LinearVelocity), Without>, + mut particles: Query<(&Transform, &mut Velocity), Without>, time: Res