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

applyRelativeForce to apply a force relative to a body Position and Angle #1058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gknedo
Copy link

@gknedo gknedo commented Nov 1, 2021

Rationale

To build bodies that apply self forces (like rockets, powered wheels) you need to apply a force relative to a body.
This method simplify the applyForce method in these situations.

Visual Representation (not in scale)

applyForce

Applying a (0,1) force on position (1,1)
image

Applying a (0,1) force on a position (1,1) in a rotated body
image

applyRelativeForce

Applying a (0,1) relative force on relative position (0,-1)
image

Applying a (0,1) relative force on a relative position (0,-1) in a rotated body
image

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.

None yet

1 participant