I want to apply a force to my object in the direction that it is currently facing, here is my code so far but it is throwing errors when I try do force * t
, what am I doing wrong?
b2Transform t;
t.Set(b2Vec2(0, 0), spaceCraft->GetAngle());
b2Vec2 force = b2Vec2(0, 2.5f);
spaceCraft->ApplyForce(force * t, spaceCraft->GetPosition());