Hi
I'm beginer with 2dbox (I use the flash version).
I've a ship, his move is controled by a reactor at this bottom. So when I press up button, the ship take off and go up.
for the moment i use:
ApplyForce(new b2Vec2(0, -200), body.GetWorldCenter());
This work fine.
But now, it's possible my ship make a rotation, but the reactor force must keep the same power and the same direction relative to my ship...
So the vector force of (0, -200) must be change depending the rotation I suppose ? Or 2dbox have a easy way to do it?
Someone know how to apply a rotate a b2Vec2 ?
Thank a lot!
I'm beginer with 2dbox (I use the flash version).
I've a ship, his move is controled by a reactor at this bottom. So when I press up button, the ship take off and go up.
for the moment i use:
ApplyForce(new b2Vec2(0, -200), body.GetWorldCenter());
This work fine.
But now, it's possible my ship make a rotation, but the reactor force must keep the same power and the same direction relative to my ship...
So the vector force of (0, -200) must be change depending the rotation I suppose ? Or 2dbox have a easy way to do it?
Someone know how to apply a rotate a b2Vec2 ?
Thank a lot!