Skip to content
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

Add wake_up parameter to rigidbody methods #34

Merged
merged 2 commits into from
Nov 19, 2020

Conversation

robert-hrusecky
Copy link
Contributor

@robert-hrusecky robert-hrusecky commented Oct 11, 2020

Add boolean parameter to rigid body methods as discussed in #5
Closes #5

Copy link
Member

@sebcrozet sebcrozet left a comment

Choose a reason for hiding this comment

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

Thank you for this PR!

  • All the self.wake_up(false) should be self.wake_up(true). This will perform a "strong" wake-up, casing the rigid-body to stay awake for a couple of frames.
  • All the if wake_up { ... } should happen only if self.body_status == BodyStatus::Dynamic.
  • The apply_*_at_point() should just forward the wake_up parameter to the methods it calls. This will make maintainance simpler.

src/dynamics/rigid_body.rs Outdated Show resolved Hide resolved
src/dynamics/rigid_body.rs Outdated Show resolved Hide resolved
@sebcrozet sebcrozet added breaking change This will result in a breaking change C-Enhancement New feature or request C-User experience Potential user-experience improvements labels Oct 12, 2020
@sebcrozet sebcrozet merged commit acc3fed into dimforge:master Nov 19, 2020
@sebcrozet
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This will result in a breaking change C-Enhancement New feature or request C-User experience Potential user-experience improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rigid bodies require manually waking when applying forces/impulses/setting velocity directly
2 participants