Skip to content

Commit

Permalink
fix ball altitude display from basic_sim3 example (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz authored Sep 10, 2024
1 parent dd69f64 commit 4bc8f3b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs-examples/3d/bevy/examples/basic_sim3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ fn setup_physics(mut commands: Commands) {
.insert(TransformBundle::from(Transform::from_xyz(0.0, 4.0, 0.0)));
}

fn print_ball_altitude(mut positions: Query<&mut Transform, With<RigidBody>>) {
for mut transform in positions.iter_mut() {
dbg!(transform.rotation.to_axis_angle());
transform.rotation = Quat::from_rotation_z(270_f32.to_radians());
//println!("Ball altitude: {}", transform.translation.y);
fn print_ball_altitude(positions: Query<&Transform, With<RigidBody>>) {
for transform in positions.iter() {
println!("Ball altitude: {}", transform.translation.y);
}
}
// DOCUSAURUS: basic_sim stop

0 comments on commit 4bc8f3b

Please sign in to comment.