calculate the change in velocity, when the body is rotated.

Currently, when i press "up" on the keyboard, i simply change my players velocity by adding a constant variable to the body's linear velocity vector's y value. However, i would like force/impuse/change in velocity(not quite sure, what is the right word) to be applied just beneath the body, even when it is rotated.

A picture probably shows better what i want:

http://img406.imageshack.us/my.php?imag ... 121fj7.jpg

I also have another small question. Is it possible to determine if a body has collided with static and dynamic bodies? For example, to check if Body1(dynamic) has collided with GroundBody(static).
I'll just guess that you want something like

void foo(b2Body* body, float const force)
{
float rad(body->GetRotation());
float cosa(std::cos(rad));
float sina(std::sin(rad));
b2Vec2 force_vector(force * cosa, force * sina);
body->ApplyForce(force_vector, body->GetCenterPosition());
}

...and for the the second question - figuring out whether some bodies have collided is mentioned in the manual.

http://www.box2d.org/manual.html - Under "Processing Contacts".
I already tried something similar, however it's still not working. Actually, nothing even happens. Just for clarity, does all box2d's functions accept only radians?
Right, Box2D takes radians for angles. Make sure the body is not sleeping or try a larger force.
I tried shamelessly to copy-paste "demo"'s code, but nothing is happening. No change in velocity or position what so ever.

Code:
     float rad(body1->GetRotation());
float cosa(cos(rad));
float sina(sin(rad));
b2Vec2 force_vector(70 * cosa, 70 * sina);
body1->ApplyForce(force_vector, body1->GetCenterPosition());


i even tried tunning the force factor up to 1170. Still no result.
Could you try inserting
body->WakeUp();
somewhere and see if that helps?
I have
Code:
body1->AllowSleeping(false);

in my body definition, so this probably isn't the problem.
Does the body have a shape with a positive density?
Yes. Here is my definition of the whole body.

Code:
//gense2
b2BoxDef sd1;
sd1.extents.Set(gense->w/2,gense->h/2);
sd1.density = 5.0f;
sd1.friction = 0.5f;

//body
b2BodyDef bd1;
bd1.position.Set(180,0);
bd1.AddShape(&sd1);
b2Body* body1 = world.CreateBody(&bd1);
body1->AllowSleeping(false);
What is the size of your world AABB? What does b2Body::IsFrozen() return?

Original thread: https://box2d.org/forum/viewtopic.php?t=119