-
Notifications
You must be signed in to change notification settings - Fork 1
Update main.rs #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Update main.rs #1
Conversation
added in the gravity and falling of the blocks from a certain height
There was a problem hiding this 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 }) |
There was a problem hiding this comment.
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 }) |
There was a problem hiding this comment.
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.
| 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); | ||
| // } |
There was a problem hiding this comment.
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.
added in the gravity and falling of the blocks from a certain height