If you want to rotate the object at an angle, you use the setTransform method, for example
b2body->SetTransform( playerBody_->GetPosition(), angleInRadian );
And if you want to constantly rotate the body, use the SetAngularVelocity method, for example
b2body->SetAngularVelocity(<float32>)
Remember that a b2body object must be dynamic or kinematic so that it can be rotated.
source share