You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Manually set the angle with SetXForm()
2. use ApplyForce() on the center of mass to avoid torque
The angle should then still be whatever is entered in SetXForm(), but
changes to very different values.
This bug was identified in box2d version 2.0.1 with the attached testbed
example.
Original issue reported on code.google.com by AnimateD...@gmail.com on 12 Oct 2009 at 5:21
This is how ApplyForce is defined in b2Body:
/// Apply a force at a world point. If the force is not
/// applied at the center of mass, it will generate a torque and
/// affect the angular velocity. This wakes up the body.
/// @param force the world force vector, usually in Newtons (N).
/// @param point the world position of the point of application.
void ApplyForce(const b2Vec2& force, const b2Vec2& point);
This is your call:
testBody->ApplyForce( b2Vec2(10,10), testBody->GetLocalCenter());
GetLocalCenter is a local point, not a world point.
Original comment by erinca...@gmail.com on 20 Nov 2009 at 6:55
Original issue reported on code.google.com by
AnimateD...@gmail.com
on 12 Oct 2009 at 5:21Attachments:
The text was updated successfully, but these errors were encountered: