Comments (2)
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 [email protected]
on 20 Nov 2009 at 6:55
- Changed state: Invalid
from box2d.
Wow. Its always something simple and I feel dumb every time.
Mr. Catto thank you very much. Everything is working as expected now.
Original comment by [email protected]
on 20 Nov 2009 at 12:29
from box2d.
Related Issues (20)
- Patch for /trunk/Box2D/Testbed/Framework/Test.h HOT 1
- World querying issues using: void RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2); HOT 2
- Testbed memory leak HOT 1
- cmake fails to build makefile because of missing source in sourcetree HOT 3
- Wheel Joint distance parameter HOT 1
- b2GrowableStack.h:54:4: error: call to function 'memcpy' HOT 1
- CMakeLists in Testbed Incomplete
- Minimum Vertex Distance in b2PolygonShape
- Unused variable warnings and static analysis fixes HOT 1
- picture doesn't work on the manual
- Firefox does not work - no drag&drop
- b2ChainShape::CreateLoop causes odd behavior when first and last vertice are the same HOT 1
- Collision glitch with polygon sliding over simple edges with ghost vertices
- The Restart button makes Testbed go back to Tiles rather than restart the current test
- Testbed build error on Mac OS X
- Making the build reproducible by removing timestamps in doxygen documentation HOT 1
- Merge particle stuff from liquidfun back into mainline
- Figures missing
- LAG PROBLEM: not fluid movement on Java Box2D game.
- Drag with Phaser Box2D plugin on Mobile Device
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from box2d.