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

Function b2Body::ApplyLinearImpulseToCenter missing #36

Closed
BlueNebulaDev opened this issue Sep 24, 2021 · 3 comments · Fixed by #39
Closed

Function b2Body::ApplyLinearImpulseToCenter missing #36

BlueNebulaDev opened this issue Sep 24, 2021 · 3 comments · Fixed by #39

Comments

@BlueNebulaDev
Copy link

b2Body::ApplyLinearImpulseToCenter seems to be missing.

It's absolutely not a problem, as it's trivial to use b2Body::ApplyLinearImpulse instead, but I thought it was a good idea to report a missing function.

@Birch-san
Copy link
Owner

hmmm yeah; you're right:

void ApplyForce([Ref] b2Vec2 force, [Ref] b2Vec2 point, boolean awake);
void ApplyForceToCenter([Ref] b2Vec2 force, boolean awake);
void ApplyTorque(float torque, boolean awake);
void ApplyLinearImpulse([Ref] b2Vec2 impulse, [Ref] b2Vec2 point, boolean awake);
void ApplyAngularImpulse(float impulse, boolean awake);

https://github.com/erincatto/box2d/blob/cd2c28dba83e4f359d08aeb7b70afd9e35e39eda/include/box2d/b2_body.h#L229

looks like a gap inherited from the original box2d.js bindings:
https://github.com/kripken/box2d.js/blob/1e6e9da36a3160a9f40cda4cddcb4f83abb4d82c/Box2D_v2.3.1.idl#L218-L222

easy enough to add; will expose this at next convenience.

@dimitrisx
Copy link

Thank you very much!

@Birch-san
Copy link
Owner

v7.0.0 exposes b2Body#ApplyLinearImpulseToCenter

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 a pull request may close this issue.

3 participants