Skip to content

Conversation

@PraneethReddy-github
Copy link

added in the gravity and falling of the blocks from a certain height

added in the gravity and falling of the blocks from a certain height
Copy link
Contributor

@allsey87 allsey87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes needed. Feel free to push more commits to this branch as you go.

commands
.spawn((Collider::cuboid(cube_size * 0.5, cube_size * 0.5, cube_size * 0.5), RigidBody::Dynamic))
.insert(ColliderMassProperties::Mass(1.0))
.insert(Damping { linear_damping: 0.1, angular_damping: 0.1 })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this, boxes of different masses should fall at the same acceleration and damping is (probably) not necessary for this project.

commands
.spawn((Collider::cuboid(cube_size * 0.5, cube_size * 0.5, cube_size * 0.5), RigidBody::Dynamic))
.insert(ColliderMassProperties::Mass(10.0))
.insert(Damping { linear_damping: 0.02, angular_damping: 0.02 })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this, boxes of different masses should fall at the same acceleration and damping is (probably) not necessary for this project.

Comment on lines -37 to +40
fn render_origin(mut gizmos: Gizmos) {
gizmos.line(Vec3::ZERO, Vec3::X, Color::RED);
gizmos.line(Vec3::ZERO, Vec3::Y, Color::GREEN);
gizmos.line(Vec3::ZERO, Vec3::Z, Color::BLUE);
}
// fn render_origin(mut gizmos: Gizmos) {
// gizmos.line(Vec3::ZERO, Vec3::X, Color::RED);
// gizmos.line(Vec3::ZERO, Vec3::Y, Color::GREEN);
// gizmos.line(Vec3::ZERO, Vec3::Z, Color::BLUE);
// }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting code in and out like this results in noise in your commit messages and makes it harder for me to see what has changed. Commits should always contain as few changes as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants